I have a program that uses a large amount of stack. I use Linux, and so have already set the stack size limit via ulimit -s 1048576.
Running cargo test -- --test-threads 1 works as expected, but when I use more than one thread, e.g. cargo test -- --test-threads 2, I get fatal runtime error: stack overflow. I believe this is because the Rust thread default stack size, used when running tests, is too small.
How do I increase this stack size when running cargo test?
Found it: RUST_MIN_STACK, as in RUST_MIN_STACK=104857600 cargo test.
You can use stacker to increase the size of the stack dynamically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With