This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled
ClosedPublic

Authored by aheejin on Sep 12 2021, 7:17 PM.

Details

Summary

This is a fix on top of D106525's Case 2. In D106525, in
runEHOnFunction which handles Emscripten EH, We rethrow longjmp only
when the module has any usage of setjmp or longjmp. But now Wasm
object files are linked using wasm-ld, the module this pass sees is not
the whole program, and even if this module does not contain any
longjmp, another file can contain it and can be linked with the
current module. This enables the rethrowing of longjmp whenever
Emscripten SjLj is enabled, regardless of whether it is used in this
module or not.

Diff Detail

Event Timeline

aheejin created this revision.Sep 12 2021, 7:17 PM
aheejin requested review of this revision.Sep 12 2021, 7:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2021, 7:17 PM
dschuff accepted this revision.Sep 13 2021, 2:06 PM
This revision is now accepted and ready to land.Sep 13 2021, 2:06 PM