-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Complex EH flow miscompiled on wasm #153948
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-miscompileIssue: Correct Rust code lowers to incorrect machine codeIssue: Correct Rust code lowers to incorrect machine codeO-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-panicArea: Panicking machineryArea: Panicking machineryC-bugCategory: This is a bug.Category: This is a bug.I-miscompileIssue: Correct Rust code lowers to incorrect machine codeIssue: Correct Rust code lowers to incorrect machine codeO-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried this code, built under
--target wasm32-unknown-emscripten --release(try setting CGUs to 1 if it doesn't reproduce on your end):I expected to see this happen: the program completes successfully.
Instead, this happened:
Version it worked on
It most recently worked on: Rust 1.94.0
Version with regression
rustc --version --verbose:Seems to coincide with an LLVM update (21 -> 22), from a quick look at the produced WASM code it increased in size and started using the
delegateopcode, probably something fishy there. Haven't had time to debug it further yet.@rustbot label +T-compiler +O-wasm +O-emscripten +A-panic +I-miscompile +A-LLVM +regression-from-stable-to-beta -regression-untriaged