You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically copy-and-paste from:
https://github.com/yamt/garbage/tree/master/wasm/longjmp
While it seems working well, it's disabled by default because:
* It might be controversial if it's a good idea to use this emscripten
API for WASI as well.
* LLVM produces bytecode for an old version of the EH proposal.
* The EH proposal is not widely implemeted in runtimes yet.
Maybe it isn't a problem for libc.a. But for libc.so, it would be
a disaster for runtimes w/o EH.
Tested with `binaryen --translate-eh-old-to-new` and toywasm:
* build wasi-libc with BUILD_SJLJ=yes
* build your app with "-mllvm -wasm-enable-sjlj"
* apply "wasm-opt --translate-eh-old-to-new"
* run with "toywasm --wasi"
Besides that, for libc.so, your embedder needs to provide
"env:__c_longjmp".
0 commit comments