[llvm-bugs] [Bug 29157] New: clang++ crashes when compiling a c++ file using boost

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 27 02:39:36 PDT 2016


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

            Bug ID: 29157
           Summary: clang++ crashes when compiling a c++ file using boost
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ralph_kube at gmx.net
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

llvm fails when compiling a c++ file. 

ssh) rku000 at tek-ift-ans89 ‹ bc ●● › : ~/source/2dads
[2] % make slab_config.o
/home/rku000/local/bin/clang++ -DDEBUG -O0 -pg -g -std=c++11 -Wall
-malign-double -fopenmp -DPINNED_HOST_MEMORY -DBOOST_NOINLINE='__attribute__
((noinline))'  -c -o /home/rku000/source/2dads/obj//slab_config.o
slab_config.cpp -I/home/rku000/source/2dads/include -I/usr/local/cuda/include
-I/usr/include/hdf5/serial -I/home/rku000/local/intel/mkl/include
clang-4.0: warning: argument unused during compilation: '-malign-double'
#0 0x0000000003328d73 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/rku000/local/bin/clang-4.0+0x3328d73)
#1 0x0000000003329135 PrintStackTraceSignalHandler(void*)
(/home/rku000/local/bin/clang-4.0+0x3329135)
#2 0x000000000332738e llvm::sys::RunSignalHandlers()
(/home/rku000/local/bin/clang-4.0+0x332738e)
#3 0x0000000003328634 SignalHandler(int)
(/home/rku000/local/bin/clang-4.0+0x3328634)
#4 0x00007fd79c6398d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xf8d0)
#5 0x00000000034c79ee ComputeLineNumbers(clang::DiagnosticsEngine&,
clang::SrcMgr::ContentCache*, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator,
4096ul, 4096ul>&, clang::SourceManager const&, bool&)
(/home/rku000/local/bin/clang-4.0+0x34c79ee)
#6 0x00000000034c7cff clang::SourceManager::getLineNumber(clang::FileID,
unsigned int, bool*) const (/home/rku000/local/bin/clang-4.0+0x34c7cff)
#7 0x00000000034c82fc
clang::SourceManager::getPresumedLoc(clang::SourceLocation, bool) const
(/home/rku000/local/bin/clang-4.0+0x34c82fc)
#8 0x0000000003be241b
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>) (/home/rku000/local/bin/clang-4.0+0x3be241b)
#9 0x0000000003b19636
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) (/home/rku000/local/bin/clang-4.0+0x3b19636)
#10 0x00000000034bdf1b
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const (/home/rku000/local/bin/clang-4.0+0x34bdf1b)
#11 0x00000000034bde9d
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const
(/home/rku000/local/bin/clang-4.0+0x34bde9d)
#12 0x00000000034b0950 clang::DiagnosticsEngine::ProcessDiag()
(/home/rku000/local/bin/clang-4.0+0x34b0950)
#13 0x00000000034b2b31 clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool)
(/home/rku000/local/bin/clang-4.0+0x34b2b31)
#14 0x0000000004cef10a clang::Sema::EmitCurrentDiagnostic(unsigned int)
(/home/rku000/local/bin/clang-4.0+0x4cef10a)
#15 0x0000000004c97eb2
clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder()
(/home/rku000/local/bin/clang-4.0+0x4c97eb2)
#16 0x0000000005136abf clang::InitializationSequence::Diagnose(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::ArrayRef<clang::Expr*>) (/home/rku000/local/bin/clang-4.0+0x5136abf)
#17 0x0000000005130e37 clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(/home/rku000/local/bin/clang-4.0+0x5130e37)
#18 0x0000000004dcfd60 clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool, bool) (/home/rku000/local/bin/clang-4.0+0x4dcfd60)
#19 0x00000000049d4a06
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/home/rku000/local/bin/clang-4.0+0x49d4a06)
#20 0x00000000049d3485 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/rku000/local/bin/clang-4.0+0x49d3485)
#21 0x00000000049d277f clang::Parser::ParseSimpleDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*) (/home/rku000/local/bin/clang-4.0+0x49d277f)
#22 0x00000000049d24a2 clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/home/rku000/local/bin/clang-4.0+0x49d24a2)
#23 0x0000000004a51e41
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/rku000/local/bin/clang-4.0+0x4a51e41)
#24 0x0000000004a51858
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*)
(/home/rku000/local/bin/clang-4.0+0x4a51858)
#25 0x0000000004a54838 clang::Parser::ParseCompoundStatementBody(bool)
(/home/rku000/local/bin/clang-4.0+0x4a54838)
#26 0x0000000004a57f67 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) (/home/rku000/local/bin/clang-4.0+0x4a57f67)
#27 0x00000000049c18c2
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&)
(/home/rku000/local/bin/clang-4.0+0x49c18c2)
#28 0x00000000049bfdbb clang::Parser::LexedMethod::ParseLexedMethodDefs()
(/home/rku000/local/bin/clang-4.0+0x49bfdbb)
#29 0x00000000049c12b4
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&)
(/home/rku000/local/bin/clang-4.0+0x49c12b4)
#30 0x00000000049f5bba
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) (/home/rku000/local/bin/clang-4.0+0x49f5bba)
#31 0x00000000049f04be
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/home/rku000/local/bin/clang-4.0+0x49f04be)
#32 0x00000000049d90bb
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/home/rku000/local/bin/clang-4.0+0x49d90bb)
#33 0x00000000049b6a87
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/rku000/local/bin/clang-4.0+0x49b6a87)
#34 0x00000000049b7038
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/rku000/local/bin/clang-4.0+0x49b7038)
#35 0x00000000049b66a1
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/home/rku000/local/bin/clang-4.0+0x49b66a1)
#36 0x00000000049b59fb
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/rku000/local/bin/clang-4.0+0x49b59fb)
#37 0x00000000049add91 clang::ParseAST(clang::Sema&, bool, bool)
(/home/rku000/local/bin/clang-4.0+0x49add91)
#38 0x0000000003ad2024 clang::ASTFrontendAction::ExecuteAction()
(/home/rku000/local/bin/clang-4.0+0x3ad2024)
#39 0x0000000003f07609 clang::CodeGenAction::ExecuteAction()
(/home/rku000/local/bin/clang-4.0+0x3f07609)
#40 0x0000000003ad1acb clang::FrontendAction::Execute()
(/home/rku000/local/bin/clang-4.0+0x3ad1acb)
#41 0x0000000003a84522
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/rku000/local/bin/clang-4.0+0x3a84522)
#42 0x0000000003bef73b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/rku000/local/bin/clang-4.0+0x3bef73b)
#43 0x00000000019c1e74 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/rku000/local/bin/clang-4.0+0x19c1e74)
#44 0x00000000019b88d2 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef) (/home/rku000/local/bin/clang-4.0+0x19b88d2)
#45 0x00000000019b94a0 main (/home/rku000/local/bin/clang-4.0+0x19b94a0)
#46 0x00007fd79b457b45 __libc_start_main
/build/glibc-uPj9cH/glibc-2.19/csu/libc-start.c:321:0
#47 0x00000000019b4bd9 _start (/home/rku000/local/bin/clang-4.0+0x19b4bd9)
Stack dump:
0.    Program arguments: /home/rku000/local/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
slab_config.cpp -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-file
/home/rku000/source/2dads/obj//slab_config.o -resource-dir
/home/rku000/local/bin/../lib/clang/4.0.0 -D DEBUG -D PINNED_HOST_MEMORY -D
BOOST_NOINLINE=__attribute__ ((noinline)) -I /home/rku000/source/2dads/include
-I /usr/local/cuda/include -I /usr/include/hdf5/serial -I
/home/rku000/local/intel/mkl/include -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward
-internal-isystem /usr/local/include -internal-isystem
/home/rku000/local/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O0 -Wall -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/rku000/source/2dads -ferror-limit 19
-fmessage-length 269 -fopenmp -pg -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -o
/home/rku000/source/2dads/obj//slab_config.o -x c++ slab_config.cpp 
1.    clang-4.0: error: unable to execute command: Segmentation fault
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 279803) (llvm/trunk 279802)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/rku000/local/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg: 
********************

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

********************
Makefile:23: recipe for target 'slab_config.o' failed
make: *** [slab_config.o] Error 254



Also another file which I couldnt attach:
[0] % cat slab_config-e0917c.sh
# Crash reproducer for clang version 4.0.0 (trunk 279803) (llvm/trunk 279802)
# Driver args: "--driver-mode=g++" "-D" "DEBUG" "-O0" "-pg" "-g" "-std=c++11"
"-Wall" "-malign-double" "-fopenmp" "-D" "PINNED_HOST_MEMORY" "-D"
"BOOST_NOINLINE=__attribute__ ((noinline))" "-c" "-o"
"/home/rku000/source/2dads/obj//slab_config.o" "slab_config.cpp" "-I"
"/home/rku000/source/2dads/include" "-I" "/usr/local/cuda/include" "-I"
"/usr/include/hdf5/serial" "-I" "/home/rku000/local/intel/mkl/include"
# Original command:  "/home/rku000/local/bin/clang-4.0" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-main-file-name" "slab_config.cpp" "-mrelocation-model" "static"
"-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" "-masm-verbose"
"-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu"
"x86-64" "-dwarf-column-info" "-debug-info-kind=limited" "-dwarf-version=4"
"-debugger-tuning=gdb" "-coverage-file"
"/home/rku000/source/2dads/obj//slab_config.o" "-resource-dir"
"/home/rku000/local/bin/../lib/clang/4.0.0" "-D" "DEBUG" "-D"
"PINNED_HOST_MEMORY" "-D" "BOOST_NOINLINE=__attribute__ ((noinline))" "-I"
"/home/rku000/source/2dads/include" "-I" "/usr/local/cuda/include" "-I"
"/usr/include/hdf5/serial" "-I" "/home/rku000/local/intel/mkl/include"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9"
"-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/home/rku000/local/bin/../lib/clang/4.0.0/include" "-internal-externc-isystem"
"/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include"
"-internal-externc-isystem" "/usr/include" "-O0" "-Wall" "-std=c++11"
"-fdeprecated-macro" "-fdebug-compilation-dir" "/home/rku000/source/2dads"
"-ferror-limit" "19" "-fmessage-length" "269" "-fopenmp" "-pg"
"-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions"
"-fdiagnostics-show-option" "-o" "/home/rku000/source/2dads/obj//slab_config.o"
"-x" "c++" "slab_config.cpp"
 "/home/rku000/local/bin/clang-4.0" "-cc1" "-triple" "x86_64-unknown-linux-gnu"
"-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "slab_config.cpp"
"-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim"
"-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
"-fuse-init-array" "-target-cpu" "x86-64" "-dwarf-column-info"
"-debug-info-kind=limited" "-dwarf-version=4" "-debugger-tuning=gdb" "-D"
"DEBUG" "-D" "PINNED_HOST_MEMORY" "-D" "BOOST_NOINLINE=__attribute__
((noinline))" "-O0" "-Wall" "-std=c++11" "-fdeprecated-macro" "-ferror-limit"
"19" "-fmessage-length" "269" "-fopenmp" "-pg" "-fobjc-runtime=gcc"
"-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-x" "c++"
"slab_config-e0917c.cpp"

-- 
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/20160827/9dd0fea8/attachment-0001.html>


More information about the llvm-bugs mailing list