{"id":30810530,"url":"https://github.com/kellpossible/stack-debug","last_synced_at":"2025-09-06T05:14:46.343Z","repository":{"id":306008636,"uuid":"1024709977","full_name":"kellpossible/stack-debug","owner":"kellpossible","description":"An experimental Rust crate for instrumenting functions to print stack sizes to debug stack overflows","archived":false,"fork":false,"pushed_at":"2025-07-23T07:09:15.000Z","size":9,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-23T22:28:42.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kellpossible.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-23T06:11:49.000Z","updated_at":"2025-08-05T10:15:09.000Z","dependencies_parsed_at":"2025-07-23T07:05:02.783Z","dependency_job_id":null,"html_url":"https://github.com/kellpossible/stack-debug","commit_stats":null,"previous_names":["kellpossible/stack-debug"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kellpossible/stack-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Fstack-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Fstack-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Fstack-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Fstack-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kellpossible","download_url":"https://codeload.github.com/kellpossible/stack-debug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellpossible%2Fstack-debug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273858876,"owners_count":25180772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-06T05:14:43.315Z","updated_at":"2025-09-06T05:14:46.330Z","avatar_url":"https://github.com/kellpossible.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `stack-debug`\n\n[![crates.io](https://img.shields.io/crates/v/stack-debug.svg)](https://crates.io/crates/stack-debug)\n\nAn experimental Rust crate with a macro for instrumenting functions to print stack sizes to debug stack overflows.\n\nThe motivation to create this crate came from a situation where I wanted to debug a stack overflow in an application and I wanted to see which functions were taking up the most amount of stack space.\n\n**Currently only x86_64 architecture is supported**.\n\n**WARNING**: The outputs from this crate are probably not precise, but they should at least give you an indication and help narrow down during investigations. The macro enables `#[inline(never)]` which may end causing different results to what you would get when the compiler decides to inline the function.\n\n## Usage\n\nIn your `.cargo/config.toml` we need to enable frame pointers, as the calculations rely on them:\n\n```toml\n[build]\nrustflags = [\"-C\", \"force-frame-pointers=y\"]\n```\n\nIn your `Cargo.toml`:\n\n```toml\n[dependencies]\nstack-debug = \"\u003cVERSION\u003e\"\n```\n\nIn your code:\n\n```rust\n#[stack_debug::instrument]\nfn my_function() {\n    // ...\n}\n```\n\n## Example Output\n\nRunning the example in [examples/example](./examples/example), the logged frame size output looks like this:\n\n```\nexample::function_with_small_stack_frame(): stack frame size: 0\nexample::function_with_large_stack_frame(): stack frame size: 4176\nexample::nested(): stack frame size: 208\n```\n\nWith the `tracing` flag enabled:\n\n```\n2025-07-23T06:23:22.461172Z  INFO function_with_small_stack_frame: example: stack frame size: 0\n2025-07-23T06:23:22.461249Z  INFO function_with_large_stack_frame: example: stack frame size: 4176\n2025-07-23T06:23:22.461518Z  INFO function_with_large_stack_frame:nested: example: stack frame size: 224\n```\n\n## Feature Flags\n\n- `tracing`: Switches to using `tracing` to log frame sizes, instead of `println!()`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellpossible%2Fstack-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkellpossible%2Fstack-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellpossible%2Fstack-debug/lists"}