llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.29k stars 12.11k forks source link

llvm stack dump #46187

Open llvmbot opened 4 years ago

llvmbot commented 4 years ago
Bugzilla Link 46843
Version unspecified
OS Linux
Attachments tmp/kwasmtest-275d26.c & kwasmtest-275d26.sh
Reporter LLVM Bugzilla Contributor

Extended Description

I am using emsdk to compile .c files and generate .wasm format. Because I intend to parse wasm in the kernel, I quoted the kernel's .h file, and then generated a stack dump during the compilation process.

Stack dump:
0.      Program arguments: /home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=19 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -D__linux__ -Dlinux -D__STDC__ -std=gnu89 -Xclang -nostdsysteminc -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/include/compat -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/include -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/include/libc -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/lib/libc/musl/arch/emscripten -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/local/include -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/include/SSE -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -I//home/wasmtest/emsdk/emscripten/master/system/local/include_0 -I/home/wasmtest/emsdk/emscripten/master/system/local/include_1 -I/home/wasmtest/emsdk/emscripten/master/system/local/include_2 -I/home/wasmtest/emsdk/emscripten/master/system/local/include_3 -I/home/wasmtest/emsdk/emscripten/master/system/local/uapi_include_0 -I/home/wasmtest/emsdk/emscripten/master/system/local/uapi_include_1 -I/home/wasmtest/emsdk/emscripten/master/system/local/uapi_include_2 -I/home/wasmtest/emsdk/emscripten/master/system/local/uapi_include_3 -I/home/wasmtest/emsdk/emscripten/master/system/local/kconfig_include kwasmtest.c -Xclang -isystem/home/wasmtest/emsdk/emscripten/master/system/include/SDL -c -o /tmp/emscripten_temp/kwasmtest_0.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr
1.      <eof> parser at end of file
2.      Code generation
 #&#8203;0 0x000055b5395756aa llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b826aa)
 #&#8203;1 0x000055b539573454 llvm::sys::RunSignalHandlers() (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b80454)
 #&#8203;2 0x000055b5395736c5 llvm::sys::CleanupOnSignal(unsigned long) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b806c5)
 #&#8203;3 0x000055b5394e9c80 CrashRecoverySignalHandler(int) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1af6c80)
 #&#8203;4 0x00007f158a5608a0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
 #&#8203;5 0x000055b53927121b (anonymous namespace)::WasmObjectWriter::writeObject(llvm::MCAssembler&, llvm::MCAsmLayout const&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x187e21b)
 #&#8203;6 0x000055b53920b15c llvm::MCAssembler::Finish() (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x181815c)
 #&#8203;7 0x000055b53924c266 llvm::MCStreamer::Finish() (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1859266)
 #&#8203;8 0x000055b539f4cff1 llvm::AsmPrinter::doFinalization(llvm::Module&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x2559ff1)
 #&#8203;9 0x000055b538f6370c llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias.513) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x157070c)
#&#8203;10 0x000055b538f6e920 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x157b920)
#&#8203;11 0x000055b5397e3688 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1df0688)
#&#8203;12 0x000055b5397e522b 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> >) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1df222b)
#&#8203;13 0x000055b53a30c8a4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x29198a4)
#&#8203;14 0x000055b53ae73709 clang::ParseAST(clang::Sema&, bool, bool) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x3480709)
#&#8203;15 0x000055b539d4d0e9 clang::FrontendAction::Execute() (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x235a0e9)
#&#8203;16 0x000055b539d06d33 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x2313d33)
#&#8203;17 0x000055b539e1344b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x242044b)
#&#8203;18 0x000055b5384e634c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xaf334c)
#&#8203;19 0x000055b5384e307d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xaf007d)
#&#8203;20 0x000055b539be1895 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::'lambda'()>(long) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x21ee895)
#&#8203;21 0x000055b5394e9d63 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1af6d63)
#&#8203;22 0x000055b539be2370 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.148) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x21ef370)
#&#8203;23 0x000055b539bbc4d5 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x21c94d5)
#&#8203;24 0x000055b539bbcf1f clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x21c9f1f)
#&#8203;25 0x000055b539bc5b25 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x21d2b25)
#&#8203;26 0x000055b53846aa41 main (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xa77a41)
#&#8203;27 0x00007f15891f4b97 __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344:0
#&#8203;28 0x000055b5384e2bfa _start (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xaefbfa)
clang-11: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 11.0.0 (https://github.com/llvm/llvm-project.git 77133cc1e2c91678082d2098b959757e72dfce60)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/wasmtest/emsdk/llvm/git/build_master_64/bin
clang-11: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/kwasmtest-275d26.c
clang-11: note: diagnostic msg: /tmp/kwasmtest-275d26.sh
clang-11: note: diagnostic msg:

********************
llvmbot commented 1 year ago

@llvm/issue-subscribers-backend-webassembly