Exception 0xc000001d crash when hitting unreachable on Windows #3413
Labels
bug
Something isn't working
🖼️ platform-windows
This issue happens on Windows
priority-medium
Medium priority issue
Describe the bug
I’m currently trying to get full stack testing with Wasmer-2.3.0+Windows(x86_64)+singlepass to work. This works nicely except for one case: I execute an unrachable operation in Wasm1. Now when I embed the CosmWasm Rust code into a shared .dll build and call into it from a Go application, I get an
Exception 0xc000001d 0x0 0x0 0x7ff93069a9a0
crash in the Rust code execution.Steps to reproduce
On Windows:
make build-rust
to rebuildinternal/api/wasmvm.dll
make test
to execute the Go tests which link wasmvm.dllExpected behavior
All tests pass.
Actual behavior
I get the crash2:
Additional context
OS: Windows Server 2022 Datacenter Edition
CPU: Intel(R) Xeon(R) CPU @ 2.30GHz
Flags: 3dnow, abm, aes, apic, avx, avx2, bmi1, bmi2, clflush, cmov, cx16, cx8, de, dts, erms, f16c, fma, fpu, fxsr, ht, hypervisor, ia64, invpcid, lahf_lm, mca, mce, mmx, movbe, msr, mtrr, osxsave, pae, pat, pcid, pclmulqdq, pge, pni, popcnt, pse, pse36, rdrnd, sep, serial, smep, ss, sse, sse2, sse4_1, sse4_2, ssse3, tm, tsc, vme, x2apic, xsave
Wasmer: 2.3.0
Rust: 1.60.0 and 1.65.0 on x86_64-pc-windows-msvc and x86_64-pc-windows-gnu
I do not get this error if
Which leads me to believe this is somehow related to the trap handlers involved after the unreachable.
Footnotes
I tested two ways to hit unreachable. First I execute metered Wasm using the default metering middleware and run a CPU loop in Wasm. Second I used
core::arch::wasm32::unreachable()
directly and compile it to Wasm. ↩Full crash output here: https://app.circleci.com/pipelines/github/CosmWasm/wasmvm/1103/workflows/d8f40c4e-d672-4b9b-a9f2-eef11b7fcdd4/jobs/5718 ↩
The text was updated successfully, but these errors were encountered: