-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.F-c_unwind`#![feature(c_unwind)]``#![feature(c_unwind)]`O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-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.
Description
I tried this code:
pub extern "C-unwind" fn gzgetc() -> i32 {
42
}
pub extern "C-unwind" fn gzgetc_() -> i32 {
gzgetc()
}
fn main() {
for gzgetc_fn in [gzgetc, gzgetc_] {
// gzgetc on a null file handle should return -1.
assert_eq!(gzgetc_fn(), -1);
}
}
compiled for wasm32-wasip1 or wasm32-unknown-unknown without -Ctarget-feature=exception-handling
.
I expected to see this happen: No exception handling instructions emitted
Instead, this happened: catch_call
is emitted for gzgetc_fn()
when opt-level < 2.
Meta
rustc --version --verbose
: Both 1.86 and nightly
This is causing failure to run on Wasmtime in some cases: trifectatechfoundation/zlib-rs#352 (comment)
Metadata
Metadata
Assignees
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.F-c_unwind`#![feature(c_unwind)]``#![feature(c_unwind)]`O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-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.