Skip to content

Tests using resume_unwind fail with -Cpanic=abort and -Zpanic_abort_tests #74301

Closed
@davidhewitt

Description

@davidhewitt

I tried this test code with RUSTFLAGS="-Cpanic=abort -Zpanic_abort_tests":

    #[test]
    #[should_panic(expected = "new panic")]
    fn resume_unwind_panics() {
        std::panic::resume_unwind(Box::new("new panic"));
    }

I expected to see this happen: The test result should be "ok".

Instead, this happened: The test fails:

failures:

---- err::tests::resume_unwind_panics stdout ----
---- err::tests::resume_unwind_panics stderr ----
Unexpected error: child process exited with signal 6

Meta

rustc --version --verbose:

rustc 1.46.0-nightly (daecab3a7 2020-07-10)
binary: rustc
commit-hash: daecab3a784f28082df90cebb204998051f3557d
commit-date: 2020-07-10
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions