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

w-boson

Windows port of backtrace-on-stack-overflow

1 unstable release

0.1.0 Sep 5, 2024

#21 in #stack-overflow

Download history 28/week @ 2024-11-15 31/week @ 2024-11-22 49/week @ 2024-11-29 103/week @ 2024-12-06 50/week @ 2024-12-13 44/week @ 2024-12-20 72/week @ 2024-12-27 24/week @ 2025-01-03 53/week @ 2025-01-10 82/week @ 2025-01-17 29/week @ 2025-01-24 12/week @ 2025-01-31 81/week @ 2025-02-07 101/week @ 2025-02-14 133/week @ 2025-02-21 31/week @ 2025-02-28

349 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