#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 61/week @ 2024-10-14 21/week @ 2024-10-21 79/week @ 2024-10-28 44/week @ 2024-11-04 9/week @ 2024-11-11 32/week @ 2024-11-18 32/week @ 2024-11-25 93/week @ 2024-12-02 67/week @ 2024-12-09 36/week @ 2024-12-16 98/week @ 2024-12-23 27/week @ 2024-12-30 18/week @ 2025-01-06 88/week @ 2025-01-13 51/week @ 2025-01-20 14/week @ 2025-01-27

177 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

~120MB
~2M SLoC