Closed
Description
I'm writing some toy programs to learn rust and encountered some strange behavior when changing stack size limits.
I tried building and running this code: https://github.com/ccope/oom-rs
I expected to see this happen: Printing out the changed stack size limit, followed by the test strings.
Instead, this happened:
-
1.19.0:
- debug: Failed
$ ./target/debug/oom the narwhal bacons at midnight Old value: 8388608 New value: 32768000 Segmentation fault (core dumped)
- release: Failed
$ ./target/release/oom Segmentation fault (core dumped)
- debug: Failed
-
1.21.0-nightly:
- debug: Pass
$ ./target/debug/oom the narwhal bacons at midnight Old value: 8388608 New value: 32768000 Approached the castle First shalt thou take out the Holy Pin, then shalt thou count to 3, no more, no less. <snip>
- release: Fail
$ ./target/release/oom thread 'main' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped)
- debug: Pass
Meta
Ubuntu 16.04, kernel 4.10.0-32-generic
rustc --version --verbose
:
1.19.0:
rustc 1.19.0 (0ade33941 2017-07-17)
binary: rustc
commit-hash: 0ade339411587887bf01bcfa2e9ae4414c8900d4
commit-date: 2017-07-17
host: x86_64-unknown-linux-gnu
release: 1.19.0
LLVM version: 4.0
1.21.0:
rustc 1.21.0-nightly (df511d554 2017-08-14)
binary: rustc
commit-hash: df511d5548ebb7f971abcd3a5283cb1d37b64596
commit-date: 2017-08-14
host: x86_64-unknown-linux-gnu
release: 1.21.0-nightly
LLVM version: 4.0