Issue 153567
Summary Codegen crash with `-mmultivalue -Xclang -target-abi -Xclang experimental-mv`
Labels new issue
Assignees
Reporter eisenwave
    ```
[build] Stack dump:
[build] 0.	Program arguments: /home/user/projects/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/home/user/projects/emsdk/upstream/emscripten/cache/sysroot -DEMSCRIPTEN -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -I/home/user/projects/mmml/include -I/home/user/projects/mmml/ulight/include -O3 -DNDEBUG -std=c++23 -stdlib=libc++ -fno-exceptions -mmultivalue -Xclang -target-abi -Xclang experimental-mv -Os -Wall -Wimplicit-fallthrough -Wpedantic -Wextra -Wconversion -Wmissing-declarations -Wunreachable-code -Wunreachable-code-return -Wno-bit-int-extension -Wno-trigraphs -MD -MT CMakeFiles/cowel-wasm.dir/src/main/cpp/util/html_entities.cpp.o -MF CMakeFiles/cowel-wasm.dir/src/main/cpp/util/html_entities.cpp.o.d -oCMakeFiles/cowel-wasm.dir/src/main/cpp/util/html_entities.cpp.o -c /home/user/projects/mmml/src/main/cpp/util/html_entities.cpp
[build] 1.	<eof> parser at end of file
[build] 2.	Per-file LLVM IR generation
[build] 3.	/home/user/projects/mmml/src/main/cpp/util/html_entities.cpp:35:28: Generating code for declaration 'cowel::(anonymous namespace)::character_reference_by_name'
[build]  #0 0x000056303a706fe8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/user/projects/emsdk/upstream/bin/clang+++0x2fd3fe8)
[build]  #1 0x000056303a70435e llvm::sys::RunSignalHandlers() (/home/user/projects/emsdk/upstream/bin/clang+++0x2fd135e)
[build]  #2 0x000056303a70623f llvm::sys::CleanupOnSignal(unsigned long) (/home/user/projects/emsdk/upstream/bin/clang+++0x2fd323f)
[build]  #3 0x000056303a6670a9 CrashRecoverySignalHandler(int) (.llvm.17961106996114892617) CrashRecoveryContext.cpp:0:0
[build]  #4 0x00007f6568600330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
[build]  #5 0x000056303dfa9380 clang::TagType::getDecl() const (/home/user/projects/emsdk/upstream/bin/clang+++0x6876380)
[build]  #6 0x000056303b2a1e3e WebAssemblyABIInfo::classifyArgumentType(clang::QualType) const (/home/user/projects/emsdk/upstream/bin/clang+++0x3b6ee3e)
[build]  #7 0x000056303b2a22ee WebAssemblyABIInfo::computeInfo(clang::CodeGen::CGFunctionInfo&) const WebAssembly.cpp:0:0
[build]  #8 0x000056303a9d6bde clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>, clang::CodeGen::FnInfoOpts, llvm::ArrayRef<clang::CanQual<clang::Type>>, clang::FunctionType::ExtInfo, llvm::ArrayRef<clang::FunctionType::ExtParameterInfo>, clang::CodeGen::RequiredArgs) (/home/user/projects/emsdk/upstream/bin/clang+++0x32a3bde)
[build]  #9 0x000056303a9d7039 arrangeLLVMFunctionInfo(clang::CodeGen::CodeGenTypes&, bool, llvm::SmallVectorImpl<clang::CanQual<clang::Type>>&, clang::CanQual<clang::FunctionProtoType>) (.llvm.4963413808011443445) CGCall.cpp:0:0
[build] #10 0x000056303a9d7202 clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(clang::CXXRecordDecl const*, clang::FunctionProtoType const*, clang::CXXMethodDecl const*) (/home/user/projects/emsdk/upstream/bin/clang+++0x32a4202)
[build] #11 0x000056303a9d74fe clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(clang::CXXMethodDecl const*) (/home/user/projects/emsdk/upstream/bin/clang+++0x32a44fe)
[build] #12 0x000056303ad0cf3f clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(clang::CallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot, bool, clang::NestedNameSpecifier*, bool, clang::Expr const*, llvm::CallBase**) (/home/user/projects/emsdk/upstream/bin/clang+++0x35d9f3f)
[build] #13 0x000056303aad9e19 clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, llvm::CallBase**) (/home/user/projects/emsdk/upstream/bin/clang+++0x33a6e19)
[build] #14 0x000056303ab8109f (anonymous namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) CGExprScalar.cpp:0:0
[build] #15 0x000056303ac17d38 clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) (/home/user/projects/emsdk/upstream/bin/clang+++0x34e4d38)
[build] #16 0x000056303ac1d8f5 clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission const&) (/home/user/projects/emsdk/upstream/bin/clang+++0x34ea8f5)
[build] #17 0x000056303ac1579d clang::CodeGen::CodeGenFunction::EmitVarDecl(clang::VarDecl const&) (/home/user/projects/emsdk/upstream/bin/clang+++0x34e279d)
[build] #18 0x000056303ac153ad clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&, bool) (/home/user/projects/emsdk/upstream/bin/clang+++0x34e23ad)
[build] #19 0x000056303ab021f0 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/home/user/projects/emsdk/upstream/bin/clang+++0x33cf1f0)
[build] #20 0x000056303ab011a4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/home/user/projects/emsdk/upstream/bin/clang+++0x33ce1a4)
[build] #21 0x000056303ab124c0 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/home/user/projects/emsdk/upstream/bin/clang+++0x33df4c0)
[build] #22 0x000056303aaef352 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/home/user/projects/emsdk/upstream/bin/clang+++0x33bc352)
[build] #23 0x000056303a98281b clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/user/projects/emsdk/upstream/bin/clang+++0x324f81b)
[build] #24 0x000056303a978887 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/home/user/projects/emsdk/upstream/bin/clang+++0x3245887)
[build] #25 0x000056303a967399 clang::CodeGen::CodeGenModule::EmitDeferred() (/home/user/projects/emsdk/upstream/bin/clang+++0x3234399)
[build] #26 0x000056303a9630fa clang::CodeGen::CodeGenModule::Release() (/home/user/projects/emsdk/upstream/bin/clang+++0x32300fa)
[build] #27 0x000056303af2feeb (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) (.llvm.10295227854492621476) ModuleBuilder.cpp:0:0
[build] #28 0x000056303af27d12 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/user/projects/emsdk/upstream/bin/clang+++0x37f4d12)
[build] #29 0x000056303c6ed2f9 clang::ParseAST(clang::Sema&, bool, bool) (/home/user/projects/emsdk/upstream/bin/clang+++0x4fba2f9)
[build] #30 0x000056303b5bd38d clang::FrontendAction::Execute() (/home/user/projects/emsdk/upstream/bin/clang+++0x3e8a38d)
[build] #31 0x000056303b4cb5c0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/user/projects/emsdk/upstream/bin/clang+++0x3d985c0)
[build] #32 0x000056303b6ca277 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/user/projects/emsdk/upstream/bin/clang+++0x3f97277)
[build] #33 0x000056303933b9be cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/user/projects/emsdk/upstream/bin/clang+++0x1c089be)
[build] #34 0x0000563039337e73 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
[build] #35 0x000056303b3014e9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
[build] #36 0x000056303a666d68 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/user/projects/emsdk/upstream/bin/clang+++0x2f33d68)
[build] #37 0x000056303b300e44 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const (/home/user/projects/emsdk/upstream/bin/clang+++0x3bcde44)
[build] #38 0x000056303b2ba270 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/user/projects/emsdk/upstream/bin/clang+++0x3b87270)
[build] #39 0x000056303b2dc5bc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__2::pair<int, clang::driver::Command const*>>&) (/home/user/projects/emsdk/upstream/bin/clang+++0x3ba95bc)
[build] #40 0x0000563039336faf clang_main(int, char**, llvm::ToolContext const&) (/home/user/projects/emsdk/upstream/bin/clang+++0x1c03faf)
[build] #41 0x000056303934768a main (/home/user/projects/emsdk/upstream/bin/clang+++0x1c1468a)
[build] #42 0x00007f65685e51ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
[build] #43 0x00007f65685e528b call_init ./csu/../csu/libc-start.c:128:20
[build] #44 0x00007f65685e528b __libc_start_main ./csu/../csu/libc-start.c:347:5
[build] #45 0x00005630392a0a2a _start (/home/user/projects/emsdk/upstream/bin/clang+++0x1b6da2a)
[build] clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
[build] clang version 21.0.0git (https:/github.com/llvm/llvm-project 2f05451198e2f222ec66cec4892ada0509519290)
[build] Target: wasm32-unknown-emscripten
[build] Thread model: posix
[build] InstalledDir: /home/user/projects/emsdk/upstream/bin
[build] clang++: note: diagnostic msg: 
[build] ********************
[build] 
[build] PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[build] Preprocessed source(s) and associated run script(s) are located at:
[build] clang++: note: diagnostic msg: /tmp/html_entities-ee8ecf.cpp
[build] clang++: note: diagnostic msg: /tmp/html_entities-ee8ecf.sh
[build] clang++: note: diagnostic msg: 
[build] 
[build] ********************
```

[html_entities-ee8ecf.sh.txt](https://github.com/user-attachments/files/21772073/html_entities-ee8ecf.sh.txt)
[html_entities-ee8ecf.cpp.txt](https://github.com/user-attachments/files/21772072/html_entities-ee8ecf.cpp.txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to