#stack-overflow #windows #backtrace #recursion #port

w-boson

Windows port of backtrace-on-stack-overflow

1 unstable release

0.1.0 Sep 5, 2024

#19 in #stack-overflow

Download history 14/week @ 2024-11-13 40/week @ 2024-11-20 29/week @ 2024-11-27 105/week @ 2024-12-04 60/week @ 2024-12-11 45/week @ 2024-12-18 74/week @ 2024-12-25 30/week @ 2025-01-01 29/week @ 2025-01-08 89/week @ 2025-01-15 41/week @ 2025-01-22 15/week @ 2025-01-29 79/week @ 2025-02-05 100/week @ 2025-02-12 128/week @ 2025-02-19 45/week @ 2025-02-26

354 downloads per month
Used in 9 crates (via erg_common)

MIT/Apache

7KB
53 lines

w-boson

Windows port of backtrace-on-stack-overflow

Usage

use w_boson::enable;
// or use w_boson::enable_backtrace_on_stack_overflow;

fn recursive(n: usize) {
    print!("{n}");
    recursive(n+1);
}

fn main() {
    unsafe { enable(); }
    recursive(0);
}

Notes

To get the correct function names even in the release build, add the following settings to Cargo.toml.

# Cargo.toml
[profile.release]
debug = true

License

MIT & Apache-2.0


lib.rs:

w-boson

Windows port of backtrace-on-stack-overflow

Usage

use w_boson::enable;
// or use w_boson::enable_backtrace_on_stack_overflow;

fn recursive(n: usize) {
    print!("{n}");
    recursive(n+1);
}

fn main() {
    unsafe { enable(); }
    recursive(0);
}

Notes

To get the correct function names even in the release build, add the following settings to Cargo.toml.

# Cargo.toml
[profile.release]
debug = true

Dependencies

~119MB
~2M SLoC