[all-commits] [llvm/llvm-project] 90073e: [WebAssembly] Error out on invalid personality fun...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Thu Jun 8 17:02:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90073e8de3871776c4df1da78d19019990241f4d
https://github.com/llvm/llvm-project/commit/90073e8de3871776c4df1da78d19019990241f4d
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2023-06-08 (Thu, 08 Jun 2023)
Changed paths:
M llvm/lib/CodeGen/WasmEHPrepare.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
A llvm/test/CodeGen/WebAssembly/wasm-eh-invalid-personality.ll
Log Message:
-----------
[WebAssembly] Error out on invalid personality functions
Without explicitly checking and erroring out, an invalid personality
function, which is not `__gxx_wasm_personality_v0`, caused
a segmentation fault down the line because `WasmEHFuncInfo` was not
created. This explicitly checks the validity of personality functions in
functions with EH pads and errors out explicitly with a helpful error
message. This also adds some more assertions to ensure `WasmEHFuncInfo`
is correctly created and non-null.
Invalid personality functions wouldn't be generated by our Clang, but
can be present in handwritten ll files, and more often, in files
transformed by passes like `metarenamer`, which is often used with
`bugpoint` to simplify names in `bugpoint`-reduced files.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D152203
More information about the All-commits
mailing list