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
Not sure if this is a proper LLVM issue or a LLVM issue caused by emscripten, so I will put it here for now and move it later if it is
Frityet
changed the title
Failed to compile project that uses Objective-C exceptions
Failed to compile project with -fwasm-exceptions that uses objc exceptions
Jan 12, 2025
Ok it seems this is an LLVM issue, where the compiler crashes when -fwasm-exceptions is used when there is a @try block in objective C, I will make a new issue there
Please include the following in your bug report:
Version of emscripten/emsdk:
Please include the output
emcc -v
here(This is the latest, as of 25-01-12, version of the emscripten docker image)
Failing command line in full:
If this is compile or link-time failure please include the full failing command
along with its entire output.
/tmp/OFAllocFailedException-198e1c.m
: https://gist.github.com/Frityet/e37e28716f1e579acb77d829223d6817/tmp/OFAllocFailedException-198e1c.sh
:# Crash reproducer for clang version 20.0.0git (https:/github.com/llvm/llvm-project 322eb1a92e6d4266184060346616fa0dbe39e731) # Driver args: "-target" "wasm32-unknown-emscripten" "-mno-bulk-memory" "-mno-bulk-memory-opt" "-mno-nontrapping-fptoint" "-mllvm" "-combiner-global-alias-analysis=false" "-mllvm" "-wasm-enable-sjlj" "-mllvm" "-disable-lsr" "--sysroot=/emsdk/upstream/emscripten/cache/sysroot" "-D" "EMSCRIPTEN" "-Werror=implicit-function-declaration" "-Xclang" "-iwithsysroot/include/fakesdl" "-Xclang" "-iwithsysroot/include/compat" "-fwasm-exceptions" "-Wall" "-fexceptions" "-fobjc-exceptions" "-funwind-tables" "-fconstant-string-class=OFConstantString" "-std=gnu11" "-pipe" "-fno-common" "-Xclang" "-fno-constant-cfstrings" "-Wsign-compare" "-Wshadow" "-Wshorten-64-to-32" "-Wundeclared-selector" "-Wsemicolon-before-method-body" "-Wobjc-missing-property-synthesis" "-Wmissing-method-return-type" "-Xclang" "-fobjc-runtime=objfw" "-Xclang" "-fblocks" "-Wwrite-strings" "-Wpointer-arith" "-Wcast-align" "-Wunreachable-code" "-Wdocumentation" "-pedantic" "-D" "_GNU_SOURCE" "-D" "OF_COMPILING_OBJFW" "-I" "." "-I" ".." "-I" "../.." "-I" "../runtime" "-MD" "-MF" "OFAllocFailedException.dep" "-c" "OFAllocFailedException.m" "-o" "OFAllocFailedException.o" # Original command: "/emsdk/upstream/bin/clang-20" "-cc1" "-triple" "wasm32-unknown-emscripten" "-emit-obj" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "OFAllocFailedException.m" "-mrelocation-model" "static" "-mframe-pointer=none" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=1" "-target-feature" "+exception-handling" "-mllvm" "-wasm-enable-eh" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-feature" "+exception-handling" "-exception-model=wasm" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-cpu" "generic" "-target-feature" "-bulk-memory" "-target-feature" "-bulk-memory-opt" "-target-feature" "-nontrapping-fptoint" "-fvisibility=hidden" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/frityet/Boxes/emscripten/objfw-1.2.3/src/exceptions" "-fcoverage-compilation-dir=/home/frityet/Boxes/emscripten/objfw-1.2.3/src/exceptions" "-resource-dir" "/emsdk/upstream/lib/clang/20" "-dependency-file" "OFAllocFailedException.dep" "-MT" "OFAllocFailedException.o" "-sys-header-deps" "-D" "EMSCRIPTEN" "-D" "_GNU_SOURCE" "-D" "OF_COMPILING_OBJFW" "-I" "." "-I" ".." "-I" "../.." "-I" "../runtime" "-isysroot" "/emsdk/upstream/emscripten/cache/sysroot" "-internal-isystem" "/emsdk/upstream/lib/clang/20/include" "-internal-isystem" "/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten" "-internal-isystem" "/emsdk/upstream/emscripten/cache/sysroot/include" "-Werror=implicit-function-declaration" "-Wall" "-Wsign-compare" "-Wshadow" "-Wshorten-64-to-32" "-Wundeclared-selector" "-Wsemicolon-before-method-body" "-Wobjc-missing-property-synthesis" "-Wmissing-method-return-type" "-Wwrite-strings" "-Wpointer-arith" "-Wcast-align" "-Wunreachable-code" "-Wdocumentation" "-pedantic" "-std=gnu11" "-fconst-strings" "-fconstant-string-class" "OFConstantString" "-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" "-iwithsysroot/include/fakesdl" "-iwithsysroot/include/compat" "-fno-constant-cfstrings" "-fobjc-runtime=objfw" "-fblocks" "-mllvm" "-combiner-global-alias-analysis=false" "-mllvm" "-wasm-enable-sjlj" "-mllvm" "-disable-lsr" "-o" "OFAllocFailedException.o" "-x" "objective-c" "OFAllocFailedException.m" "/emsdk/upstream/bin/clang-20" "-cc1" "-triple" "wasm32-unknown-emscripten" "-emit-obj" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "OFAllocFailedException.m" "-mrelocation-model" "static" "-mframe-pointer=none" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=1" "-target-feature" "+exception-handling" "-mllvm" "-wasm-enable-eh" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-feature" "+exception-handling" "-exception-model=wasm" "-target-feature" "+multivalue" "-target-feature" "+reference-types" "-target-cpu" "generic" "-target-feature" "-bulk-memory" "-target-feature" "-bulk-memory-opt" "-target-feature" "-nontrapping-fptoint" "-fvisibility=hidden" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/frityet/Boxes/emscripten/objfw-1.2.3/src/exceptions" "-fcoverage-compilation-dir=/home/frityet/Boxes/emscripten/objfw-1.2.3/src/exceptions" "-sys-header-deps" "-D" "EMSCRIPTEN" "-D" "_GNU_SOURCE" "-D" "OF_COMPILING_OBJFW" "-Werror=implicit-function-declaration" "-Wall" "-Wsign-compare" "-Wshadow" "-Wshorten-64-to-32" "-Wundeclared-selector" "-Wsemicolon-before-method-body" "-Wobjc-missing-property-synthesis" "-Wmissing-method-return-type" "-Wwrite-strings" "-Wpointer-arith" "-Wcast-align" "-Wunreachable-code" "-Wdocumentation" "-pedantic" "-std=gnu11" "-fconst-strings" "-fconstant-string-class" "OFConstantString" "-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" "-iwithsysroot/include/fakesdl" "-iwithsysroot/include/compat" "-fno-constant-cfstrings" "-fobjc-runtime=objfw" "-fblocks" "-mllvm" "-combiner-global-alias-analysis=false" "-mllvm" "-wasm-enable-sjlj" "-mllvm" "-disable-lsr" "-x" "objective-c" "OFAllocFailedException-198e1c.m"
Same result also occurs with emscripten running on macOS 13
The text was updated successfully, but these errors were encountered: