[LLVMbugs] [Bug 16561] New: clang dumps core compiling C++ code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 8 06:14:52 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16561

            Bug ID: 16561
           Summary: clang dumps core compiling C++ code
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nadiasvertex at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

christopher at wol-dev in /meps/workspace/pypy-cql on default at tip?
☿ ./test.sh                                                                     
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o native/src/cpp/test/test_mq.o -c -g -std=c++11 -Inative/src/cpp
native/src/cpp/test/test_mq.cpp
clang++ -o native/src/cpp/test/test_index.o -c -g -std=c++11 -Inative/src/cpp
native/src/cpp/test/test_index.cpp
clang++ -o native/src/cpp/test/test_value.o -c -g -std=c++11 -Inative/src/cpp
native/src/cpp/test/test_value.cpp
In file included from native/src/cpp/test/test_value.cpp:8:
native/src/cpp/datafile/value.h:25:14: error: unknown type name 'ofstream'; did
you mean 'std::ofstream'?
        virtual put(ofstream& stream, const T& value) {
                    ^~~~~~~~
                    std::ofstream
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/iosfwd:162:34:
note: 'std::ofstream' declared here
  typedef basic_ofstream<char>          ofstream;
                                        ^
In file included from native/src/cpp/test/test_value.cpp:8:
native/src/cpp/datafile/value.h:25:10: error: C++ requires a type specifier for
all declarations
        virtual put(ofstream& stream, const T& value) {
        ~~~~~~~ ^
native/src/cpp/datafile/value.h:34:14: error: unknown type name 'ofstream'; did
you mean 'std::ofstream'?
        virtual get(ofstream& stream, T& value) {
                    ^~~~~~~~
                    std::ofstream
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/iosfwd:162:34:
note: 'std::ofstream' declared here
  typedef basic_ofstream<char>          ofstream;
                                        ^
In file included from native/src/cpp/test/test_value.cpp:8:
native/src/cpp/datafile/value.h:34:10: error: C++ requires a type specifier for
all declarations
        virtual get(ofstream& stream, T& value) {
        ~~~~~~~ ^
clang: /meps/llvm/tools/clang/lib/Sema/SemaOverload.cpp:4682:
clang::ImplicitConversionSequence
clang::TryObjectArgumentInitialization(clang::Sema&, clang::QualType,
clang::Expr::Classification, clang::CXXMethodDecl*, clang::CXXRecordDecl*):
Assertion `FromType->isRecordType()' failed.
0  clang           0x000000000233e852 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x000000000233e4a9
2  libpthread.so.0 0x00007f5c99566bd0
3  libc.so.6       0x00007f5c987a4037 gsignal + 55
4  libc.so.6       0x00007f5c987a7698 abort + 328
5  libc.so.6       0x00007f5c9879ce03
6  libc.so.6       0x00007f5c9879ceb2
7  clang           0x0000000000d8fdc2
8  clang           0x0000000000d8fef6
clang::Sema::PerformObjectArgumentInitialization(clang::Expr*,
clang::NestedNameSpecifier*, clang::NamedDecl*, clang::CXXMethodDecl*) + 246
9  clang           0x0000000000da62e5
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) + 2293
10 clang           0x0000000000ba1435 clang::Sema::tryExprAsCall(clang::Expr&,
clang::QualType&, clang::UnresolvedSetImpl&) + 629
11 clang           0x0000000000ba468c
clang::Sema::tryToRecoverWithCall(clang::ActionResult<clang::Expr*, true>&,
clang::PartialDiagnostic const&, bool, bool (*)(clang::QualType)) + 188
12 clang           0x0000000000cc7a69
clang::Sema::CheckPlaceholderExpr(clang::Expr*) + 297
13 clang           0x0000000000cd8435
clang::Sema::CheckBooleanCondition(clang::Expr*, clang::SourceLocation) + 69
14 clang           0x0000000000cd8551
clang::Sema::ActOnBooleanCondition(clang::Scope*, clang::SourceLocation,
clang::Expr*) + 17
15 clang           0x0000000000b4964f
clang::Parser::ParseCXXCondition(clang::ActionResult<clang::Expr*, true>&,
clang::Decl*&, clang::SourceLocation, bool) + 1455
16 clang           0x0000000000b6a8b8
clang::Parser::ParseParenExprOrCondition(clang::ActionResult<clang::Expr*,
true>&, clang::Decl*&, clang::SourceLocation, bool) + 200
17 clang           0x0000000000b7280d
clang::Parser::ParseIfStatement(clang::SourceLocation*) + 157
18 clang           0x0000000000b6f00f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1599
19 clang           0x0000000000b6f18d
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 141
20 clang           0x0000000000b6fc8f
clang::Parser::ParseCompoundStatementBody(bool) + 1919
21 clang           0x0000000000b71353
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 211
22 clang           0x0000000000b84f5b
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 603
23 clang           0x0000000000b84c6c
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 172
24 clang           0x0000000000b38b0d
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 2445
25 clang           0x0000000000b3a946
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 3830
26 clang           0x0000000000b21045
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 3253
27 clang           0x0000000000b7ad46
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 886
28 clang           0x0000000000b7c733
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 723
29 clang           0x0000000000b7cbfe
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 158
30 clang           0x0000000000b29931
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 545
31 clang           0x0000000000b12af9
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 457
32 clang           0x0000000000b33f6a
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 378
33 clang           0x0000000000b345b5 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1461
34 clang           0x0000000000b2995b
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 587
35 clang           0x0000000000b12af9
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 457
36 clang           0x0000000000b33f6a
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 378
37 clang           0x0000000000b345b5 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1461
38 clang           0x0000000000b2995b
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 587
39 clang           0x0000000000b12af9
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 457
40 clang           0x0000000000b12fe3
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 195
41 clang           0x0000000000b0db37 clang::ParseAST(clang::Sema&, bool, bool)
+ 263
42 clang           0x000000000098de11 clang::CodeGenAction::ExecuteAction() +
97
43 clang           0x000000000080d779 clang::FrontendAction::Execute() + 265
44 clang           0x00000000007ed655
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
45 clang           0x00000000007d4722
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1858
46 clang           0x00000000007cda68 cc1_main(char const**, char const**, char
const*, void*) + 1224
47 clang           0x00000000007b9c7d main + 4941
48 libc.so.6       0x00007f5c9878eea5 __libc_start_main + 245
49 clang           0x00000000007cc8b1
Stack dump:
0.    Program arguments: /meps/llvm-build/Release+Asserts/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name test_value.cpp -mrelocation-model static -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.23.2 -g
-coverage-file /meps/workspace/pypy-cql/native/src/cpp/test/test_value.o
-resource-dir /meps/llvm-build/Release+Asserts/bin/../lib/clang/3.4 -I
native/src/cpp -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7
-internal-isystem /usr/local/include -internal-isystem
/meps/llvm-build/Release+Asserts/bin/../lib/clang/3.4/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir /meps/workspace/pypy-cql
-ferror-limit 19 -fmessage-length 176 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o native/src/cpp/test/test_value.o -x c++ native/src/cpp/test/test_value.cpp 
1.    native/src/cpp/datafile/value.h:26:24: current parser token ')'
2.    native/src/cpp/datafile/value.h:13:1: parsing namespace 'cql'
3.    native/src/cpp/datafile/value.h:14:1: parsing namespace 'datafile'
4.    native/src/cpp/datafile/value.h:17:1: parsing struct/union/class body
'translator'
5.    native/src/cpp/datafile/value.h:25:48: parsing function body 'put'
6.    native/src/cpp/datafile/value.h:25:48: in compound statement ('{}')
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 184666)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: 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: 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/test_value-7fT8l9.cpp
clang: note: diagnostic msg: /tmp/test_value-7fT8l9.sh
clang: note: diagnostic msg: 

********************
scons: *** [native/src/cpp/test/test_value.o] Error 254
scons: building terminated because of errors.

-- 
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/20130708/5f422f4a/attachment.html>


More information about the llvm-bugs mailing list