Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wasm][AOT] Compilation fails with "Basic Block in function XX does not have terminator!" #50561

Closed
jeromelaban opened this issue Apr 1, 2021 · 6 comments
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Milestone

Comments

@jeromelaban
Copy link
Contributor

jeromelaban commented Apr 1, 2021

Description

Using Wasm FullAOT, compiling a large async function fails with the following error:

Basic Block in function 'XXXX_Asyncd__251_MoveNext' does not have terminator!
label %NOTINITED_BB181
in function XXXAsyncd__251_MoveNext
fatal error: error in backend: Broken function found, compilation aborted!
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: /home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang++ -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=12 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration --sysroot=/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/cache/include -Xclang -iwithsysroot/include/libcxx -Xclang -iwithsysroot/lib/libcxxabi/include -Xclang -iwithsysroot/include/compat -Xclang -iwithsysroot/include/libc -Xclang -iwithsysroot/lib/libc/musl/arch/emscripten -Xclang -iwithsysroot/local/include -Xclang -iwithsysroot/include/SSE -Xclang -iwithsysroot/include/neon -Xclang -iwithsysroot/lib/compiler-rt/include -Xclang -iwithsysroot/lib/libunwind/include -emit-llvm -DENABLE_METADATA_UPDATE=1 -DGEN_PINVOKE -I/mnt/c/Users/jerome.laban/AppData/Local/Temp/dotnet-runtime-wasm-1939784-2784aadb026-26782-Release/runtimes/browser-wasm/native -Oz -c XXXX.dll.bc -o XXX.dll.o
1.	Per-function optimization
2.	Running pass 'Module Verifier' on function '@XXXAsyncd__251_MoveNext'
 #0 0x00007fc01496cfd3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84efd3)
 #1 0x00007fc01496ae0e llvm::sys::RunSignalHandlers() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84ce0e)
 #2 0x00007fc01496c34d llvm::sys::CleanupOnSignal(unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84e34d)
 #3 0x00007fc0148a5143 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787143)
 #4 0x00007fc0148a50bf llvm::CrashRecoveryContext::HandleExit(int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x7870bf)
 #5 0x00007fc014967557 llvm::sys::Process::Exit(int, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x849557)
 #6 0x0000000000411890 llvm::DenseMapBase<llvm::DenseMap<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >, llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >::destroyAll() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411890)
 #7 0x00007fc0148b4392 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796392)
 #8 0x00007fc0148b4266 (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796266)
 #9 0x00007fc014b6b26f (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0xa4d26f)
#10 0x00007fc014adb648 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bd648)
#11 0x00007fc014adad49 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bcd49)
#12 0x00007fc014ae2114 llvm::legacy::FunctionPassManager::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9c4114)
#13 0x00007fc011d9897d 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/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x184197d)
#14 0x00007fc0120ca006 clang::CodeGenAction::ExecuteAction() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1b73006)
#15 0x00007fc0129bd2c0 clang::FrontendAction::Execute() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24662c0)
#16 0x00007fc01293dd3a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x23e6d3a)
#17 0x00007fc012a324c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24db4c4)
#18 0x0000000000411524 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411524)
#19 0x000000000040f22c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40f22c)
#20 0x00007fc012580332 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) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2029332)
#21 0x00007fc0148a5057 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787057)
#22 0x00007fc01257fa99 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2028a99)
#23 0x00007fc01254a128 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff3128)
#24 0x00007fc01254a42a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff342a)
#25 0x00007fc012565a18 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x200ea18)
#26 0x000000000040eafe main (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40eafe)
#27 0x00007fc00fbb1b97 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#28 0x000000000040bf9a _start (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40bf9a)
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 52e240a0721e4120a7143f6f5bab4760d28d48e8)
Target: wasm32-unknown-emscripten
Thread model: posix

Here's the associated IR file:
aot-llvm-issue.txt

Configuration

2784aad

Regression?

No

Other information

edit: This issue also happens in mixed mode

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 1, 2021
@vargaz
Copy link
Contributor

vargaz commented Apr 2, 2021

Can you upload the obj/bin dir somewhere ?

@ghost
Copy link

ghost commented Apr 2, 2021

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Using Wasm FullAOT, compiling a large async function fails with the following error:

Basic Block in function 'XXXX_Asyncd__251_MoveNext' does not have terminator!
label %NOTINITED_BB181
in function XXXAsyncd__251_MoveNext
fatal error: error in backend: Broken function found, compilation aborted!
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: /home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang++ -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=12 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration --sysroot=/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/cache/include -Xclang -iwithsysroot/include/libcxx -Xclang -iwithsysroot/lib/libcxxabi/include -Xclang -iwithsysroot/include/compat -Xclang -iwithsysroot/include/libc -Xclang -iwithsysroot/lib/libc/musl/arch/emscripten -Xclang -iwithsysroot/local/include -Xclang -iwithsysroot/include/SSE -Xclang -iwithsysroot/include/neon -Xclang -iwithsysroot/lib/compiler-rt/include -Xclang -iwithsysroot/lib/libunwind/include -emit-llvm -DENABLE_METADATA_UPDATE=1 -DGEN_PINVOKE -I/mnt/c/Users/jerome.laban/AppData/Local/Temp/dotnet-runtime-wasm-1939784-2784aadb026-26782-Release/runtimes/browser-wasm/native -Oz -c XXXX.dll.bc -o XXX.dll.o
1.	Per-function optimization
2.	Running pass 'Module Verifier' on function '@XXXAsyncd__251_MoveNext'
 #0 0x00007fc01496cfd3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84efd3)
 #1 0x00007fc01496ae0e llvm::sys::RunSignalHandlers() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84ce0e)
 #2 0x00007fc01496c34d llvm::sys::CleanupOnSignal(unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84e34d)
 #3 0x00007fc0148a5143 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787143)
 #4 0x00007fc0148a50bf llvm::CrashRecoveryContext::HandleExit(int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x7870bf)
 #5 0x00007fc014967557 llvm::sys::Process::Exit(int, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x849557)
 #6 0x0000000000411890 llvm::DenseMapBase<llvm::DenseMap<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >, llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >::destroyAll() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411890)
 #7 0x00007fc0148b4392 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796392)
 #8 0x00007fc0148b4266 (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796266)
 #9 0x00007fc014b6b26f (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0xa4d26f)
#10 0x00007fc014adb648 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bd648)
#11 0x00007fc014adad49 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bcd49)
#12 0x00007fc014ae2114 llvm::legacy::FunctionPassManager::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9c4114)
#13 0x00007fc011d9897d 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/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x184197d)
#14 0x00007fc0120ca006 clang::CodeGenAction::ExecuteAction() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1b73006)
#15 0x00007fc0129bd2c0 clang::FrontendAction::Execute() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24662c0)
#16 0x00007fc01293dd3a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x23e6d3a)
#17 0x00007fc012a324c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24db4c4)
#18 0x0000000000411524 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411524)
#19 0x000000000040f22c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40f22c)
#20 0x00007fc012580332 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) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2029332)
#21 0x00007fc0148a5057 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787057)
#22 0x00007fc01257fa99 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2028a99)
#23 0x00007fc01254a128 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff3128)
#24 0x00007fc01254a42a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff342a)
#25 0x00007fc012565a18 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x200ea18)
#26 0x000000000040eafe main (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40eafe)
#27 0x00007fc00fbb1b97 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#28 0x000000000040bf9a _start (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40bf9a)
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 52e240a0721e4120a7143f6f5bab4760d28d48e8)
Target: wasm32-unknown-emscripten
Thread model: posix

Here's the associated IR file:
aot-llvm-issue.txt

Configuration

2784aad

Regression?

No

Other information

Author: jeromelaban
Assignees: -
Labels:

area-VM-meta-mono, untriaged

Milestone: -

@jeromelaban jeromelaban changed the title [Wasm][AOT] FullAOT compilation fails with "Basic Block in function XX does not have terminator!" [Wasm][AOT] Compilation fails with "Basic Block in function XX does not have terminator!" Apr 15, 2021
@vargaz
Copy link
Contributor

vargaz commented May 10, 2021

This might be caused by:
dotnet/linker#2016

@lewing lewing added the arch-wasm WebAssembly architecture label May 13, 2021
@ghost
Copy link

ghost commented May 13, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Using Wasm FullAOT, compiling a large async function fails with the following error:

Basic Block in function 'XXXX_Asyncd__251_MoveNext' does not have terminator!
label %NOTINITED_BB181
in function XXXAsyncd__251_MoveNext
fatal error: error in backend: Broken function found, compilation aborted!
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: /home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang++ -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system/include/SDL -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=12 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration --sysroot=/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/system -Xclang -isystem/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/emscripten/cache/include -Xclang -iwithsysroot/include/libcxx -Xclang -iwithsysroot/lib/libcxxabi/include -Xclang -iwithsysroot/include/compat -Xclang -iwithsysroot/include/libc -Xclang -iwithsysroot/lib/libc/musl/arch/emscripten -Xclang -iwithsysroot/local/include -Xclang -iwithsysroot/include/SSE -Xclang -iwithsysroot/include/neon -Xclang -iwithsysroot/lib/compiler-rt/include -Xclang -iwithsysroot/lib/libunwind/include -emit-llvm -DENABLE_METADATA_UPDATE=1 -DGEN_PINVOKE -I/mnt/c/Users/jerome.laban/AppData/Local/Temp/dotnet-runtime-wasm-1939784-2784aadb026-26782-Release/runtimes/browser-wasm/native -Oz -c XXXX.dll.bc -o XXX.dll.o
1.	Per-function optimization
2.	Running pass 'Module Verifier' on function '@XXXAsyncd__251_MoveNext'
 #0 0x00007fc01496cfd3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84efd3)
 #1 0x00007fc01496ae0e llvm::sys::RunSignalHandlers() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84ce0e)
 #2 0x00007fc01496c34d llvm::sys::CleanupOnSignal(unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x84e34d)
 #3 0x00007fc0148a5143 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787143)
 #4 0x00007fc0148a50bf llvm::CrashRecoveryContext::HandleExit(int) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x7870bf)
 #5 0x00007fc014967557 llvm::sys::Process::Exit(int, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x849557)
 #6 0x0000000000411890 llvm::DenseMapBase<llvm::DenseMap<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >, llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >::destroyAll() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411890)
 #7 0x00007fc0148b4392 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796392)
 #8 0x00007fc0148b4266 (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x796266)
 #9 0x00007fc014b6b26f (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0xa4d26f)
#10 0x00007fc014adb648 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bd648)
#11 0x00007fc014adad49 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9bcd49)
#12 0x00007fc014ae2114 llvm::legacy::FunctionPassManager::run(llvm::Function&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x9c4114)
#13 0x00007fc011d9897d 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/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x184197d)
#14 0x00007fc0120ca006 clang::CodeGenAction::ExecuteAction() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1b73006)
#15 0x00007fc0129bd2c0 clang::FrontendAction::Execute() (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24662c0)
#16 0x00007fc01293dd3a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x23e6d3a)
#17 0x00007fc012a324c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x24db4c4)
#18 0x0000000000411524 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x411524)
#19 0x000000000040f22c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40f22c)
#20 0x00007fc012580332 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) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2029332)
#21 0x00007fc0148a5057 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libLLVM-12git.so+0x787057)
#22 0x00007fc01257fa99 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x2028a99)
#23 0x00007fc01254a128 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff3128)
#24 0x00007fc01254a42a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x1ff342a)
#25 0x00007fc012565a18 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/../lib/libclang-cpp.so.12git+0x200ea18)
#26 0x000000000040eafe main (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40eafe)
#27 0x00007fc00fbb1b97 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#28 0x000000000040bf9a _start (/home/jay/.uno/emsdk/emsdk-2.0.12/emsdk/upstream/bin/clang+++0x40bf9a)
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 52e240a0721e4120a7143f6f5bab4760d28d48e8)
Target: wasm32-unknown-emscripten
Thread model: posix

Here's the associated IR file:
aot-llvm-issue.txt

Configuration

2784aad

Regression?

No

Other information

edit: This issue also happens in mixed mode

Author: jeromelaban
Assignees: -
Labels:

arch-wasm, area-VM-meta-mono, untriaged

Milestone: -

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label May 13, 2021
@lewing lewing added this to the 6.0.0 milestone May 13, 2021
@lewing
Copy link
Member

lewing commented May 18, 2021

fixed in dotnet/linker#2037

@lewing lewing closed this as completed May 18, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

No branches or pull requests

4 participants