Closed c2a3e69c-562c-4f99-832d-c31da5d7e71d closed 2 years ago
This crash (actually an UNREACHABLE, if assertions are enabled) got fixed for bug 48571 in https://github.com/llvm/llvm-project/commit/7654bb6303d290b19cad29137be810e69a0bf917, and the fix was merged to the release/12.x branch in https://github.com/llvm/llvm-project/commit/7cc5b1593554c4a589e5e57c64c28bbd85c9987f.
This bug has been marked as a duplicate of bug llvm/llvm-project#47915
Extended Description
Hi there, I'd like to report a crash clang when trying to compile one of our source code files. Stacktrace and attachments can be found below.
Best regards Michael
Attachments: https://moduleworksgmbh-my.sharepoint.com/:u:/g/personal/michael_moduleworks_com/EdWAA5iQ-dJFrcoNNiSfa8wBAelou2ya0RIDRYX7i_NcOA?e=8cfXW9
Stack dump:
0 0x00007f152d3bbef3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xbd8ef3)
1 0x00007f152d3ba210 llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xbd7210)
2 0x00007f152d3bb64d llvm::sys::CleanupOnSignal(unsigned long) (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xbd864d)
3 0x00007f152d30b416 (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xb28416)
4 0x00007f1534bf23c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
5 0x00007f15336e7747 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x174e747)
6 0x00007f15335fa590 clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1661590)
7 0x00007f15335f0829 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1657829)
8 0x00007f1533614993 clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(clang::CallExpr const, clang::CXXMethodDecl const, clang::CodeGen::ReturnValueSlot, bool, clang::NestedNameSpecifier, bool, clang::Expr const) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x167b993)
9 0x00007f1533615a41 clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(clang::CXXOperatorCallExpr const, clang::CXXMethodDecl const, clang::CodeGen::ReturnValueSlot) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x167ca41)
10 0x00007f15335f9195 clang::CodeGen::CodeGenFunction::EmitCallExprLValue(clang::CallExpr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1660195)
11 0x00007f15335f0799 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1657799)
12 0x00007f15335f0561 clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1657561)
13 0x00007f1533725dbd clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const, llvm::ArrayRef<clang::Attr const>) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x178cdbd)
14 0x00007f153372fd8c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1796d8c)
15 0x00007f153372f22f clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x179622f)
16 0x00007f153372640a clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const, llvm::ArrayRef<clang::Attr const>) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x178d40a)
17 0x00007f1533725ce4 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const, llvm::ArrayRef<clang::Attr const>) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x178cce4)
18 0x00007f15336e52d4 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x174c2d4)
19 0x00007f15336d3e4b clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x173ae4b)
20 0x00007f15336bac67 clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(clang::CodeGen::CodeGenFunction&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&, clang::SourceLocation, clang::Expr const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1721c67)
21 0x00007f15337472ab clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(clang::OMPCriticalDirective const&) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ae2ab)
22 0x00007f1533725f74 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const, llvm::ArrayRef<clang::Attr const>) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x178cf74)
23 0x00007f153372fd8c clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1796d8c)
24 0x00007f153377ba1b clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17e2a1b)
25 0x00007f153377c23c clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17e323c)
26 0x00007f15337943f7 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17fb3f7)
27 0x00007f153378e644 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17f5644)
28 0x00007f1533784f01 clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf01)
29 0x00007f1533784f1f clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf1f)
30 0x00007f1533784f1f clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf1f)
31 0x00007f1533784f1f clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf1f)
32 0x00007f1533784f1f clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf1f)
33 0x00007f1533784f1f clang::CodeGen::CodeGenModule::EmitDeferred() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17ebf1f)
34 0x00007f1533783ca9 clang::CodeGen::CodeGenModule::Release() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17eaca9)
35 0x00007f1533805574 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x186c574)
36 0x00007f1533773406 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x17da406)
37 0x00007f15328d1d94 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x938d94)
38 0x00007f1533e67118 clang::FrontendAction::Execute() (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1ece118)
39 0x00007f1533df4dd1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1e5bdd1)
40 0x00007f1533ec9502 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1f30502)
41 0x0000000000412782 cc1_main(llvm::ArrayRef<char const>, char const, void*) (/usr/bin/clang++-12+0x412782)
42 0x0000000000410afe (/usr/bin/clang++-12+0x410afe)
43 0x00007f1533b10d82 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1b77d82)
44 0x00007f152d30b1ed llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xb281ed)
45 0x00007f1533b10579 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1b77579)
46 0x00007f1533ae5b2f clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1b4cb2f)
47 0x00007f1533ae5ee7 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1b4cee7)
48 0x00007f1533afa99c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1b6199c)
49 0x00000000004103d4 main (/usr/bin/clang++-12+0x4103d4)
50 0x00007f152c2ca0b3 __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
51 0x000000000040dcbe _start (/usr/bin/clang++-12+0x40dcbe)
clang: error: clang frontend command failed with exit code 139 (use -v to see invocation) Ubuntu clang version 12.0.0-3ubuntu1~20.04.4 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/mwOpticSurfGridSampler-4192e7.cpp clang: note: diagnostic msg: /tmp/mwOpticSurfGridSampler-4192e7.sh clang: note: diagnostic msg: