[PATCH] D94048: [WebAssembly] Fix call unwind mismatches
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 6 13:24:39 PST 2021
sbc100 added a comment.
I bisected a breaking in emscripten to this change.
Looks like it fails when building libc++-except:
https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket.appspot.com/8856015771238931600/+/steps/Build_Emscripten__upstream_/0/stdout
I can repro locally with `./embuilder build libc++-except --force`:
em++: error: '/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang++ -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -iwithsysroot/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=13 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -flegacy-pass-manager -Werror=implicit-function-declaration --sysroot=/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -Werror -DLIBCXX_BUILDING_LIBCXXABI=1 -D_LIBCPP_BUILDING_LIBRARY -Oz -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -fwasm-exceptions -c /usr/local/google/home/sbc/dev/wasm/emscripten/system/lib/libcxx/src/filesystem/operations.cpp -o /usr/local/google/home/sbc/dev/wasm/emscripten/cache/build/libc++-except/operations.o' failed (134)
clang++: /usr/local/google/home/sbc/dev/wasm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:295: llvm::SmallVectorTemplateCommon::reference llvm::SmallVectorTemplateCommon<const llvm::MachineBasicBlock *>::back() [T = const llvm::MachineBasicBlock *]: Assertion `!empty()' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang++ -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -iwithsysroot/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=13 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -flegacy-pass-manager -Werror=implicit-function-declaration --sysroot=/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -Werror -DLIBCXX_BUILDING_LIBCXXABI=1 -D_LIBCPP_BUILDING_LIBRARY -Oz -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -fwasm-exceptions -c /usr/local/google/home/sbc/dev/wasm/emscripten/system/lib/libcxx/src/locale.cpp -o /usr/local/google/home/sbc/dev/wasm/emscripten/cache/build/libc++-except/locale.o
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/usr/local/google/home/sbc/dev/wasm/emscripten/system/lib/libcxx/src/locale.cpp'.
4. Running pass 'WebAssembly CFG Stackify' on function '@_ZNSt3__216__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_'
#0 0x00007fb9af51eb63 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0x190b63)
#1 0x00007fb9af51c8ae llvm::sys::RunSignalHandlers() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0x18e8ae)
#2 0x00007fb9af51dedd llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0x18fedd)
#3 0x00007fb9af44f603 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0xc1603)
#4 0x00007fb9af44f76e CrashRecoverySignalHandler(int) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0xc176e)
#5 0x00007fb9b323c140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#6 0x00007fb9af0a6ce1 raise ./signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#7 0x00007fb9af090537 abort ./stdlib/abort.c:81:7
#8 0x00007fb9af09040f get_sysdep_segment_value ./intl/loadmsgcat.c:509:8
#9 0x00007fb9af09040f _nl_load_domain ./intl/loadmsgcat.c:970:34
#10 0x00007fb9af09f662 (/lib/x86_64-linux-gnu/libc.so.6+0x34662)
#11 0x00007fb9b32e4343 (anonymous namespace)::WebAssemblyCFGStackify::placeMarkers(llvm::MachineFunction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMWebAssemblyCodeGen.so.13git+0x3f343)
#12 0x00007fb9b32de823 (anonymous namespace)::WebAssemblyCFGStackify::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMWebAssemblyCodeGen.so.13git+0x39823)
#13 0x00007fb9b2509dbd llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCodeGen.so.13git+0x28adbd)
#14 0x00007fb9af8c7658 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.13git+0x21e658)
#15 0x00007fb9af8ce151 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.13git+0x225151)
#16 0x00007fb9af8c7cf7 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.13git+0x21ecf7)
#17 0x00007fb9b2a97878 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangCodeGen.so.13git+0xcb878)
#18 0x00007fb9b2dcaaec clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangCodeGen.so.13git+0x3feaec)
#19 0x00007fb9acb4a5e4 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libclangParse.so.13git+0x365e4)
#20 0x00007fb9b15b5610 clang::FrontendAction::Execute() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontend.so.13git+0x127610)
#21 0x00007fb9b152fb4a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontend.so.13git+0xa1b4a)
#22 0x00007fb9b3223914 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontendTool.so.13git+0x4914)
#23 0x0000000000413339 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x413339)
#24 0x0000000000411202 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x411202)
#25 0x00007fb9b12e48a2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::$_1>(long) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.13git+0xa38a2)
#26 0x00007fb9af44f517 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.13git+0xc1517)
#27 0x00007fb9b12e43f7 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.13git+0xa33f7)
#28 0x00007fb9b12b27bf clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.13git+0x717bf)
#29 0x00007fb9b12b2ab7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.13git+0x71ab7)
#30 0x00007fb9b12cabcc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.13git+0x89bcc)
#31 0x0000000000410b5d main (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x410b5d)
#32 0x00007fb9af091d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#33 0x000000000040e00a _start (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x40e00a)
clang-13: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git ed41945faadab27036d368cda9223dc3cb6eb840)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /usr/local/google/home/sbc/dev/wasm/llvm-build/bin
clang-13: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/locale-aa9420.cpp
clang-13: note: diagnostic msg: /tmp/locale-aa9420.sh
clang-13: note: diagnostic msg:
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94048/new/
https://reviews.llvm.org/D94048
More information about the llvm-commits
mailing list