[llvm-bugs] [Bug 42685] New: clang-9 stage2 build: crash on "LLVM IR generation of compound statement ('{}')"

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 18 23:56:11 PDT 2019


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

            Bug ID: 42685
           Summary: clang-9 stage2 build: crash on "LLVM IR generation of
                    compound statement ('{}')"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk
            Blocks: 42474

0.      Program arguments:
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/clang-9 -cc1 -triple
x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name ASTImporter.cpp -mrelocation-model pic
-pic-level 2 -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=4
-debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file
/build/llvm-toolchain-9-9~svn366428/build-llvm/tools/clang/stage2-bins/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.gcno
-resource-dir /build/llvm-toolchain-9-9~svn366428/build-llvm/lib/clang/9.0.0 -D
_GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D
__STDC_LIMIT_MACROS -I
/build/llvm-toolchain-9-9~svn366428/build-llvm/tools/clang/stage2-bins/tools/clang/lib/AST
-I /build/llvm-toolchain-9-9~svn366428/tools/clang/lib/AST -I
/build/llvm-toolchain-9-9~svn366428/tools/clang/include -I
/build/llvm-toolchain-9-9~svn366428/build-llvm/tools/clang/stage2-bins/tools/clang/include
-I
/build/llvm-toolchain-9-9~svn366428/build-llvm/tools/clang/stage2-bins/include
-I /build/llvm-toolchain-9-9~svn366428/include -D NDEBUG -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward
-internal-isystem /usr/include/clang/9.0.0/include/ -internal-isystem
/usr/local/include -internal-isystem
/build/llvm-toolchain-9-9~svn366428/build-llvm/lib/clang/9.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-Wno-unused-command-line-argument -Wno-unknown-warning-option -Werror=date-time
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wno-long-long
-Wimplicit-fallthrough -Wcovered-switch-default -Wno-class-memaccess
-Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
-Wstring-conversion -Woverloaded-virtual -Wno-nested-anon-types -pedantic
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/build/llvm-toolchain-9-9~svn366428/build-llvm/tools/clang/stage2-bins/tools/clang/lib/AST
-ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden
-fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -faddrsig -o CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o -x
c++ /build/llvm-toolchain-9-9~svn366428/tools/clang/lib/AST/ASTImporter.cpp 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      /build/llvm-toolchain-9-9~svn366428/include/llvm/ADT/DenseMap.h:391:8:
Generating code for declaration 'llvm::DenseMapBase<llvm::DenseMap<clang::Decl
*, clang::ImportError, llvm::DenseMapInfo<clang::Decl *>,
llvm::detail::DenseMapPair<clang::Decl *, clang::ImportError> >, clang::Decl *,
clang::ImportError, llvm::DenseMapInfo<clang::Decl *>,
llvm::detail::DenseMapPair<clang::Decl *, clang::ImportError>
>::moveFromOldBuckets'
4.      /build/llvm-toolchain-9-9~svn366428/include/llvm/ADT/DenseMap.h:397:73:
LLVM IR generation of compound statement ('{}')
5.      /build/llvm-toolchain-9-9~svn366428/include/llvm/ADT/DenseMap.h:399:60:
LLVM IR generation of compound statement ('{}')
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libLLVM-9.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x7f76495edcca]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libLLVM-9.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x7f76494a6be4]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libLLVM-9.so.1(+0x24e1d85)[0x7f76494a6d85]
/lib/x86_64-linux-gnu/libc.so.6(+0x43f60)[0x7f764cfa9f60]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction21EmitCXXDestructorCallENS_10GlobalDeclERKNS0_8CGCalleeEPN4llvm5ValueENS_8QualTypeES8_S9_PKNS_8CallExprE+0x5d)[0x7f764bfae6bd]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(+0xeccead)[0x7f764bd6fead]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction37EmitCXXMemberOrOperatorMemberCallExprEPKNS_8CallExprEPKNS_13CXXMethodDeclENS0_15ReturnValueSlotEbPNS_19NestedNameSpecifierEbPKNS_4ExprE+0x5d4)[0x7f764bfb2ac4]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction21EmitCXXMemberCallExprEPKNS_17CXXMemberCallExprENS0_15ReturnValueSlotE+0x98)[0x7f764bfb34d8]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction12EmitCallExprEPKNS_8CallExprENS0_15ReturnValueSlotE+0x5c)[0x7f764bfbbdcc]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(+0x1087a69)[0x7f764bf2aa69]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(+0x106912b)[0x7f764bf0c12b]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction14EmitScalarExprEPKNS_4ExprEb+0x5c)[0x7f764bf0f39c]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction11EmitAnyExprEPKNS_4ExprENS0_12AggValueSlotEb+0x63)[0x7f764bfba5b3]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction15EmitIgnoredExprEPKNS_4ExprE+0x6e)[0x7f764bfbb61e]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtEN4llvm8ArrayRefIPKNS_4AttrEEE+0xc5)[0x7f764be65325]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction28EmitCompoundStmtWithoutScopeERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0xac)[0x7f764be6b13c]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction16EmitCompoundStmtERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0x14b)[0x7f764be7519b]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction14EmitSimpleStmtEPKNS_4StmtE+0x99)[0x7f764be75299]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtEN4llvm8ArrayRefIPKNS_4AttrEEE+0x38)[0x7f764be65298]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction10EmitIfStmtERKNS_6IfStmtE+0x365)[0x7f764be6ae95]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction28EmitCompoundStmtWithoutScopeERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0xac)[0x7f764be6b13c]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction16EmitCompoundStmtERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0x14b)[0x7f764be7519b]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction14EmitSimpleStmtEPKNS_4StmtE+0x99)[0x7f764be75299]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtEN4llvm8ArrayRefIPKNS_4AttrEEE+0x38)[0x7f764be65298]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction11EmitForStmtERKNS_7ForStmtEN4llvm8ArrayRefIPKNS_4AttrEEE+0x49a)[0x7f764be69e7a]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction28EmitCompoundStmtWithoutScopeERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0xac)[0x7f764be6b13c]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction16EmitFunctionBodyEPKNS_4StmtE+0x73)[0x7f764be6b313]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen15CodeGenFunction12GenerateCodeENS_10GlobalDeclEPN4llvm8FunctionERKNS0_14CGFunctionInfoE+0x226)[0x7f764be6b586]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE+0x15a)[0x7f764be6bbda]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE+0x244)[0x7f764be6c384]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xb7)[0x7f764b3c6757]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xcf)[0x7f764b3c676f]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang7CodeGen13CodeGenModule7ReleaseEv+0x28)[0x7f764be372d8]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(+0xec54aa)[0x7f764bd684aa]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(+0xf530b7)[0x7f764bdf60b7]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang8ParseASTERNS_4SemaEbb+0x272)[0x7f764c91caa2]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang13CodeGenAction13ExecuteActionEv+0x37)[0x7f764be3b277]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang14FrontendAction7ExecuteEv+0xb9)[0x7f764b921809]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x1b3)[0x7f764b9497e3]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/../lib/libclang-cpp.so.9(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x4e3)[0x7f764b8cef63]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/clang-9(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x7a4)[0x55d918542894]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/clang-9(main+0x2295)[0x55d918325e65]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f764cf8cb6b]
/build/llvm-toolchain-9-9~svn366428/build-llvm/bin/clang-9(_start+0x2a)[0x55d91832625a]
clang-9: error: unable to execute command: Segmentation fault
clang-9: error: clang frontend command failed due to signal (use -v to see
invocation)
Ubuntu clang version 9.0.0-svn366428-1~exp1~20190718225332.4
(branches/release_90) (based on LLVM 9.0.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /build/llvm-toolchain-9-9~svn366428/build-llvm/./bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/ASTImporter-a6baff.cpp
clang-9: note: diagnostic msg: /tmp/ASTImporter-a6baff.sh
clang-9: note: diagnostic msg: 

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


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=42474
[Bug 42474] [meta] 9.0.0 Release Blockers
-- 
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/20190719/923605f7/attachment.html>


More information about the llvm-bugs mailing list