[LLVMbugs] [Bug 2708] New: Crash on Objective-C and fsyntax-only
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Aug 22 03:20:24 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2708
Summary: Crash on Objective-C and fsyntax-only
Product: clang
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: parser
AssignedTo: unassignedbugs at nondot.org
ReportedBy: thomascl at free.fr
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=1947)
--> (http://llvm.org/bugs/attachment.cgi?id=1947)
test case
The attached source code produces a crash when using fsyntax-only:
--------------
thomas$ clang -fsyntax-only Objc.m
Objc.m:3:2: error: expected identifier
+- (void)myMethod;
^
Objc.m:3:2: error: expected ';' after method proto
Objc.m:6:1: warning: incomplete implementation
@implementation MyClass
^
0 clang 0x002f8f73
_ZN4llvm3sys7Program17FindProgramByNameERKSs + 611
1 clang 0x002f923d
_ZN4llvm3sys28PrintStackTraceOnErrorSignalEv + 593
2 libSystem.B.dylib 0x9419509b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 clang 0x001f98c5
_ZNK5clang20MultiKeywordSelector7getNameEv + 51
5 clang 0x001f9aa9
_ZNK5clang8Selector7getNameEv + 249
6 clang 0x0012bbe1
_ZN5clang4Sema19WarnUndefinedMethodENS_14SourceLocationEPNS_14ObjCMethodDeclERb
+ 83
7 clang 0x0012dcbe
_ZN5clang4Sema25ImplMethodsVsClassMethodsEPNS_22ObjCImplementationDeclEPNS_17ObjCInterfaceDeclE
+ 594
8 clang 0x0012f406
_ZN5clang4Sema10ActOnAtEndENS_14SourceLocationEPvPS2_jS3_j + 1980
9 clang 0x001c3319
_ZN5clang6Parser25ParseObjCAtEndDeclarationENS_14SourceLocationE + 205
10 clang 0x001c8c3e
_ZN5clang6Parser21ParseObjCAtDirectivesEv + 302
11 clang 0x001cf06c
_ZN5clang6Parser24ParseExternalDeclarationEv + 414
12 clang 0x001cf14d
_ZN5clang6Parser17ParseTopLevelDeclERPv + 61
13 clang 0x0010d09e
_ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEb + 404
14 clang 0x00029a1f
_Z22InitializeIncludePathsPKcRN5clang12HeaderSearchERNS1_11FileManagerERKNS1_11LangOptionsE
+ 2965
15 clang 0x0002ab90 main + 1628
16 clang 0x0000189e start + 54
Bus error
--------------
Looks like the parser fails to handle correctly the syntax error.
If I remove the @implementation block, there's no crash anymore.
LLVM anc Clang rev 55175.
Thomas
--
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