Issue |
123659
|
Summary |
[clang] Clang crashes when an objective C exception is attempted to be caught when `-fwasm-exceptions` is enabled on a wasm{32,64} target
|
Labels |
clang
|
Assignees |
|
Reporter |
Frityet
|
[Crash info](https://gist.github.com/Frityet/83fa2c7eee836515f871d59c594e9479)
Reproducer:
```objc
extern void f();
int main()
{
@try {
f();
} @catch(id) {
}
}
```
Command:
```
# Crash reproducer for Homebrew clang version 19.1.6
# Driver args: "t.m" "-target" "wasm32-unknown-none" "-fwasm-exceptions"
# Original command: "/usr/local/Cellar/llvm/19.1.6/bin/clang-19" "-cc1" "-triple" "wasm32-unknown-none" "-emit-obj" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "t.m" "-mrelocation-model" "static" "-mframe-pointer=none" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-target-feature" "+exception-handling" "-mllvm" "-wasm-enable-eh" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-cpu" "generic" "-fvisibility=hidden" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/Users/frityet/Documents/scratch" "-target-linker-version" "1022.1" "-fcoverage-compilation-dir=/Users/frityet/Documents/scratch" "-resource-dir" "/usr/local/Cellar/llvm/19.1.6/lib/clang/19" "-internal-isystem" "/usr/local/Cellar/llvm/19.1.6/lib/clang/19/include" "-internal-isystem" "/include" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fobjc-runtime=gnustep" "-fobjc-encode-cxx-class-template-spec" "-fobjc-exceptions" "-fexceptions" "-exception-model=wasm" "-fcolor-diagnostics" "-o" "/var/folders/ps/cqv_3ytx5nn59k5q3k17th500000gn/T/t-e67633.o" "-x" "objective-c" "t.m"
"/usr/local/Cellar/llvm/19.1.6/bin/clang-19" "-cc1" "-triple" "wasm32-unknown-none" "-emit-obj" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "t.m" "-mrelocation-model" "static" "-mframe-pointer=none" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-target-feature" "+exception-handling" "-mllvm" "-wasm-enable-eh" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-cpu" "generic" "-fvisibility=hidden" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/Users/frityet/Documents/scratch" "-target-linker-version" "1022.1" "-fcoverage-compilation-dir=/Users/frityet/Documents/scratch" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fobjc-runtime=gnustep" "-fobjc-encode-cxx-class-template-spec" "-fobjc-exceptions" "-fexceptions" "-exception-model=wasm" "-fcolor-diagnostics" "-x" "objective-c" "t-3e83b8.m"
```
Cannot be reproduced on godbolt due to the fact that godbolt objective C does not allow for clang to be selected as the compiler for some reason?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs