Skip to content

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

Open
@cicilzx

Description

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)

Activity

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 on May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @cicilzx

      Issue actions

        Execution of test cases at a particular compilation optimization level appears to be stack overflow · Issue #246 · fitzgen/bumpalo