Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution of test cases at a particular compilation optimization level appears to be stack overflow #246

Open
cicilzx opened this issue May 5, 2024 · 0 comments

Comments

@cicilzx
Copy link

cicilzx commented May 5, 2024

I find that when using -C opt-level=0 as the compilation optimization level, all of the test cases can pass. However, if we use -C opt-level=1/2/3/s/z, a stackoverflow bug would be triggered.

For example, using the command:

RUSTFLAGS="-Z mir-opt-level=0 -C opt-level=1" cargo test

The output is as follows:

running 3 tests
test tests::chunk_footer_is_five_words ... ok
test tests::test_realloc ... ok
test tests::invalid_read ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/all/main.rs (target/debug/deps/all-1c1e9abc570bf81b)

running 55 tests

thread 'alloc_try_with::alloc_try_with_large_struct' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass `--test all`

Caused by:
  process didn't exit successfully: `/local/home/zixliu/crates/bumpalo/target/debug/deps/all-1c1e9abc570bf81b` (signal: 6, SIGABRT: process abort signal)
@cicilzx cicilzx changed the title Execution of test cases at a particular compilation optimization level appears to be panic Execution of test cases at a particular compilation optimization level appears to be stack overflow May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant