<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvm stack dump"
   href="https://bugs.llvm.org/show_bug.cgi?id=46843">46843</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm stack dump
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>haiying.liu@bst.ai
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23771" name="attach_23771" title="tmp/kwasmtest-275d26.c & kwasmtest-275d26.sh">attachment 23771</a> <a href="attachment.cgi?id=23771&action=edit" title="tmp/kwasmtest-275d26.c & kwasmtest-275d26.sh">[details]</a></span>
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>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
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>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
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 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
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:

********************</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>