[LLVMbugs] [Bug 3002] New: clang: crash on incomplete typedef
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Oct 31 23:31:37 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=3002
Summary: clang: crash on incomplete typedef
Product: clang
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Keywords: crash-on-invalid
Severity: normal
Priority: P2
Component: parser
AssignedTo: unassignedbugs at nondot.org
ReportedBy: richard at godbee.net
CC: llvmbugs at cs.uiuc.edu
A .c file containing only the word "typedef" crashes clang r58543 (trunk):
(gdb) run
Starting program: /Users/rwg/llvm/inst-llvm/bin/clang -fsyntax-only
typedef-crash.c
Reading symbols for shared libraries +++. done
typedef-crash.c:1:8: error: expected identifier or '('
typedef
^
typedef-crash.c:1:1: error: declarator requires an identifier
typedef
^~~~~~~
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x00528725 in clang::Decl::getKind (this=0x0) at DeclBase.h:151
151 Kind getKind() const { return DeclKind; }
(gdb) bt
#0 0x00528725 in clang::Decl::getKind (this=0x0) at DeclBase.h:151
#1 0x00528785 in clang::VarDecl::classof (D=0x0) at Decl.h:332
#2 0x0001f079 in llvm::isa_impl<clang::VarDecl, clang::Decl> (Val=@0x0) at
Casting.h:54
#3 0x00582935 in llvm::isa_impl_wrap<clang::VarDecl, clang::Decl const,
clang::Decl const>::doit (Val=@0x0) at Casting.h:71
#4 0x0001f08f in llvm::isa_impl_cl<clang::Decl>::isa<clang::VarDecl>
(Val=@0x0) at Casting.h:83
#5 0x0058294d in llvm::isa_impl_cl<clang::Decl*>::isa<clang::VarDecl>
(Val=0x0) at Casting.h:101
#6 0x0001f0a7 in llvm::isa<clang::VarDecl, clang::Decl*> (Val=@0xbfffef08) at
Casting.h:116
#7 0x0001f485 in llvm::dyn_cast<clang::VarDecl, clang::Decl*>
(Val=@0xbfffef08) at Casting.h:225
#8 0x00572182 in clang::Sema::ActOnUninitializedDecl (this=0xbffff270,
dcl=0x0) at SemaDecl.cpp:1616
#9 0x00636f5f in clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator
(this=0xbffff448, D=@0xbffff030) at ParseDecl.cpp:314
#10 0x00637205 in clang::Parser::ParseSimpleDeclaration (this=0xbffff448,
Context=0) at ParseDecl.cpp:232
#11 0x00637278 in clang::Parser::ParseDeclaration (this=0xbffff448, Context=0)
at ParseDecl.cpp:209
#12 0x00651064 in clang::Parser::ParseExternalDeclaration (this=0xbffff448) at
Parser.cpp:363
#13 0x006510d7 in clang::Parser::ParseTopLevelDecl (this=0xbffff448,
Result=@0xbffff500) at Parser.cpp:289
#14 0x005690c0 in clang::ParseAST (PP=@0x1f03cb0, Consumer=0x1f04510,
PrintStats=false, FreeMemory=true) at ParseAST.cpp:55
#15 0x0003cca7 in ProcessInputFile (PP=@0x1f03cb0, PPF=@0xbffff7c8,
InFile=@0x1f025f0, PA=ParseSyntaxOnly) at clang.cpp:1336
#16 0x0003ec7e in main (argc=3, argv=0xbffff87c) at clang.cpp:1530
--
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