Skip to content

SIGSEGV when compiling for target wasm32-unknown-unknown with LLVM target feature 'multivalue' #73916

Open
@adrian17

Description

@adrian17

I tried this code:

pub fn f() -> ! {
    panic!("");
}

With compiler invocation: rustc --crate-type lib mytest.rs --target wasm32-unknown-unknown -C target-feature=+multivalue

I expected to see this happen: no failure

Instead, this happened:

Segmentation fault (core dumped)

Meta

rustc --version --verbose:

rustc 1.46.0-nightly (16957bd4d 2020-06-30)
binary: rustc
commit-hash: 16957bd4d3a5377263f76ed74c572aad8e4b7e59
commit-date: 2020-06-30
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0
Backtrace

No backtrace.

Can also be reproduced on godbolt with current nightly: https://godbolt.org/z/Pqg986
Also, there is no crash when the feature is not enabled (not mentioned at all or -C target-feature=-multivalue), or when I build with -O.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions