[llvm-bugs] [Bug 46843] New: llvm stack dump

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 24 21:48:43 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46843

            Bug ID: 46843
           Summary: llvm stack dump
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: haiying.liu at bst.ai
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 23771
  --> https://bugs.llvm.org/attachment.cgi?id=23771&action=edit
tmp/kwasmtest-275d26.c & kwasmtest-275d26.sh

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
 #0 0x000055b5395756aa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b826aa)
 #1 0x000055b539573454 llvm::sys::RunSignalHandlers()
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b80454)
 #2 0x000055b5395736c5 llvm::sys::CleanupOnSignal(unsigned long)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1b806c5)
 #3 0x000055b5394e9c80 CrashRecoverySignalHandler(int)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1af6c80)
 #4 0x00007f158a5608a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
 #5 0x000055b53927121b (anonymous
namespace)::WasmObjectWriter::writeObject(llvm::MCAssembler&, llvm::MCAsmLayout
const&) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x187e21b)
 #6 0x000055b53920b15c llvm::MCAssembler::Finish()
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x181815c)
 #7 0x000055b53924c266 llvm::MCStreamer::Finish()
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1859266)
 #8 0x000055b539f4cff1 llvm::AsmPrinter::doFinalization(llvm::Module&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x2559ff1)
 #9 0x000055b538f6370c llvm::FPPassManager::doFinalization(llvm::Module&)
(.localalias.513)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x157070c)
#10 0x000055b538f6e920 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x157b920)
#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)
#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)
#13 0x000055b53a30c8a4
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x29198a4)
#14 0x000055b53ae73709 clang::ParseAST(clang::Sema&, bool, bool)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x3480709)
#15 0x000055b539d4d0e9 clang::FrontendAction::Execute()
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x235a0e9)
#16 0x000055b539d06d33
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x2313d33)
#17 0x000055b539e1344b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x242044b)
#18 0x000055b5384e634c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xaf334c)
#19 0x000055b5384e307d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xaf007d)
#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)
#21 0x000055b5394e9d63
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0x1af6d63)
#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)
#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)
#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)
#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)
#26 0x000055b53846aa41 main
(/home/wasmtest/emsdk/llvm/git/build_master_64/bin/clang+0xa77a41)
#27 0x00007f15891f4b97 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344:0
#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:

********************

-- 
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/20200725/3114f956/attachment.html>


More information about the llvm-bugs mailing list