[LLVMbugs] [Bug 12346] New: Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer")

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 24 12:12:52 PDT 2012


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

             Bug #: 12346
           Summary: Assertion failed: (!isNull() && "Cannot retrieve a
                    NULL type pointer")
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Keywords: crash-on-invalid
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: abigagli at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8264
  --> http://llvm.org/bugs/attachment.cgi?id=8264
preprocessed source and associated run script at the point of assert

On MacOSX 10.7.3, clang built from trunk r153882 asserts as in summary while
testing libc++ built from trunk at same revision with that same clang
executable.

Full diagnostics follows:


passed 2 tests in
/Users/abigagli/develop/LLVM_FACTORY/LIBCXX/test/containers/sequences/forwardlist/forwardlist.iter
Assertion failed: (!isNull() && "Cannot retrieve a NULL type pointer"),
function getCommonPtr, file
/Volumes/develop/LLVM_FACTORY/LLVM/tools/clang/lib/AST/../../include/clang/AST/Type.h,
line 504.
0  clang             0x00000001060b3282 _ZL15PrintStackTracePv + 34
1  clang             0x00000001060b38b9 _ZL13SignalHandleri + 745
2  libsystem_c.dylib 0x00007fff8b3d2cfa _sigtramp + 26
3  clang             0x00000001051d9fe0
clang::Sema::LookupQualifiedName(clang::LookupResult&, clang::DeclContext*,
bool) + 178
4  clang             0x00000001060b31e6 abort + 22
5  clang             0x00000001060b3238 __assert_rtn + 56
6  clang             0x0000000105696312
clang::ASTContext::getCanonicalType(clang::QualType) const + 114
7  clang             0x00000001051ee646
_ZN5clangL34CompareStandardConversionSequencesERNS_4SemaERKNS_26StandardConversionSequenceES4_
+ 550
8  clang             0x00000001051f0124
_ZN5clangL34CompareImplicitConversionSequencesERNS_4SemaERKNS_26ImplicitConversionSequenceES4_
+ 372
9  clang             0x00000001051f57bb
clang::isBetterOverloadCandidate(clang::Sema&, clang::OverloadCandidate const&,
clang::OverloadCandidate const&, clang::SourceLocation, bool) + 155
10 clang             0x00000001051fdb71
clang::OverloadCandidateSet::BestViableFunction(clang::Sema&,
clang::SourceLocation, clang::OverloadCandidate*&, bool) + 99
11 clang             0x000000010520820e
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation) +
2868
12 clang             0x0000000105167567
clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool) +
1175
13 clang             0x0000000104fc651b
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 3329
14 clang             0x0000000104fc9b8e
clang::Parser::ParseCastExpression(bool, bool, bool&,
clang::Parser::TypeCastState) + 9668
15 clang             0x0000000104fc3a21
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 133
16 clang             0x0000000104fa33ad
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 1513
17 clang             0x0000000104faba09
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1273
18 clang             0x0000000104fb3be9
clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, bool,
clang::Parser::ForRangeInit*) + 709
19 clang             0x0000000104fb3e62
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 444
20 clang             0x0000000104fe8d0a
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 1978
21 clang             0x0000000104fef112
clang::Parser::ParseCompoundStatementBody(bool) + 1370
22 clang             0x0000000104fe8ded
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 2205
23 clang             0x0000000104fef112
clang::Parser::ParseCompoundStatementBody(bool) + 1370
24 clang             0x0000000104fef9c3
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 177
25 clang             0x0000000104ffe8fa
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&,
llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 2170
26 clang             0x0000000104fabbd4
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1732
27 clang             0x0000000104ffb5e9
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 281
28 clang             0x0000000104ffba02
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 432
29 clang             0x0000000104ffc70c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 3086
30 clang             0x0000000104ffcc02
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 314
31 clang             0x0000000104f9d9d5 clang::ParseAST(clang::Sema&, bool) +
309
32 clang             0x0000000104f677c7 clang::CodeGenAction::ExecuteAction() +
1163
33 clang             0x0000000104d51698
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 850
34 clang             0x0000000104d391d2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2434
35 clang             0x0000000104d32460 cc1_main(char const**, char const**,
char const*, void*) + 2848
36 clang             0x0000000104d3610d main + 621
37 clang             0x0000000104d31934 start + 52
Stack dump:
0.    Program arguments: /Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/clang
-cc1 -triple x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free
-main-file-name insert_after_init.pass.cpp -pic-level 1 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -resource-dir
/Users/abigagli/LLVM-LOCAL/3.1svn/INSTALL/bin/../lib/clang/3.1 -I
/Users/abigagli/develop/LLVM_FACTORY/LIBCXX/include -fmodule-cache-path
/var/folders/59/_cxj9vx5675bjmykljv0vdm00000gn/T/clang-module-cache
-stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/Users/abigagli/develop/LLVM_FACTORY/LIBCXX/test/containers/sequences/forwardlist/forwardlist.modifiers
-ferror-limit 19 -fmessage-length 171 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/59/_cxj9vx5675bjmykljv0vdm00000gn/T/insert_after_init-oY2508.o -x
c++ insert_after_init.pass.cpp 
1.    insert_after_init.pass.cpp:25:51: current parser token ')'
2.    insert_after_init.pass.cpp:18:1: parsing function body 'main'
3.    insert_after_init.pass.cpp:18:1: in compound statement ('{}')
4.    insert_after_init.pass.cpp:20:5: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list