[llvm-bugs] [Bug 43354] New: Crash when compiling a simple hello world into webassembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 18 14:19:27 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43354
Bug ID: 43354
Summary: Crash when compiling a simple hello world into
webassembly
Product: clang
Version: trunk
Hardware: Other
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: dodoentertainment at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Created attachment 22521
--> https://bugs.llvm.org/attachment.cgi?id=22521&action=edit
preprocessed source and run script
While attempting to compile a [simple
file](https://github.com/microblink/conan-emsdk_installer/blob/master/test_package/test_package.cpp)
using upstream clang with emscripten 1.38.43, I get the following error:
/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/em++
@CMakeFiles/test_package.dir/includes_CXX.rsp -m64 -stdlib=libc++ -DNDEBUG
-O2 -o CMakeFiles/test_package.dir/test_package.cpp.o -c
/Users/dodo/Work/Microblink/conan-toolchains/emscripten/toolchain/test_package/test_package.cpp
shared:INFO: (Emscripten: Running sanity checks)
clang++: warning: argument unused during compilation: '-stdlib=libc++'
[-Wunused-command-line-argument]
fatal error: error in backend: Cannot select: t13: i64 =
WebAssemblyISD::Wrapper
TargetGlobalAddress:i64<%"class.std::__2::basic_ostream"* @_ZNSt3__24coutE> 0
t12: i64 = TargetGlobalAddress<%"class.std::__2::basic_ostream"*
@_ZNSt3__24coutE> 0
In function: __original_main
clang++: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 10.0.0
(/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project
4e71702cd4ab2c77aaa753770e99526085e5e6eb)
Target: wasm64-unknown-emscripten
Thread model: posix
InstalledDir:
/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg:
/var/folders/fc/38fp3j9x3dd74ng4fl8jhjtr0000gn/T/test_package-f7af59.cpp
clang++: note: diagnostic msg:
/var/folders/fc/38fp3j9x3dd74ng4fl8jhjtr0000gn/T/test_package-f7af59.sh
clang++: note: diagnostic msg: Crash backtrace is located in
clang++: note: diagnostic msg:
/Users/dodo/Library/Logs/DiagnosticReports/clang++_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang++: note: diagnostic msg: (choose the .crash file that corresponds to your
crash)
clang++: note: diagnostic msg:
********************
shared:ERROR:
'/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/bin/clang++
-target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1
-D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=43 -D_LIBCPP_ABI_VERSION=2
-Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang
-nostdsysteminc -Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/include/libcxx
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/lib/libcxxabi/include
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/include/compat
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/include
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/include/libc
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/lib/libc/musl/arch/emscripten
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/local/include
-DEMSCRIPTEN
-I/Users/dodo/.conan/data/nodejs_installer/10.16.2/microblink/stable/package/743cf0321be3152777da4d05247a66d1552e70a2/include
-m64 -stdlib=libc++ -DNDEBUG -O2 -c -std=c++03
/Users/dodo/Work/Microblink/conan-toolchains/emscripten/toolchain/test_package/test_package.cpp
-Xclang
-isystem/Users/dodo/.conan/data/emsdk_installer/1.38.43/microblink/stable/package/339b241ab70014e42ce028d81ee6caa76f3d4557/upstream/emscripten/system/include/SDL
-c -o CMakeFiles/test_package.dir/test_package.cpp.o -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm
-disable-lsr' failed (70)
The preprocessed source and associated run script are attached. Crash backtrace
did not exist at the specified location.
You can also reproduce the error by cloning [this
repository](https://github.com/microblink/conan-emsdk_installer) and running
conan create . user/testing -o emsdk_installer:fastcomp=False on MacOS.
The fastcomp backend works correctly, but it has some other issues, which I
went to check if they were fixed with the upstream backend, when I stumbled
upon the reported crash. I will also report those other issues, although I
doubt that those will be fixed in the fastcomp backend, as it will be probably
deprecated once upstream backend becomes the default.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190918/ad8599b9/attachment-0001.html>
More information about the llvm-bugs
mailing list