WebAssembly / exception-handling

Proposal to add exception handling to WebAssembly
https://webassembly.github.io/exception-handling/
Other
162 stars 35 forks source link

[legacy] Add setjmp bait #332

Open SoniEx2 opened 1 month ago

SoniEx2 commented 1 month ago

sadly UBSAN doesn't appear to detect this (yet).

rossberg commented 1 month ago

Shouldn't we have a corresponding test for the non-legacy instruction?

SoniEx2 commented 1 month ago

yes, eventually

wasm2c only supports EHL at this point so having the test for EHv4 isn't that critical yet.

SoniEx2 commented 1 month ago

surprisingly, this test also appears to break wabt interpreter.

for context, the interpreter isn't even using setjmp.

aheejin commented 1 month ago

Sorry I may lack some context, but what is this test about? They say setjmp and longjmp but here they are just normal functions. Does this test have any specific characteristics or does this just happen to be the case the wabt interpreter fails on? Apparenly this PR doesn't have any changes to the spec interpreter so that is fine, right?

SoniEx2 commented 1 month ago

the test targets wasm2c specifically, where exceptions are implemented using setjmp/longjmp, but also happens to trigger a bug in wabt interpreter (which is mostly unrelated to wasm2c, despite also being part of wabt).

the wabt interpreter is unrelated to the spec interpreter, the spec interpreter is probably fine.