[LLVMbugs] [Bug 7386] New: Reproducible crash (with test case) wrt templates & @protocols

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 15 17:51:09 CDT 2010


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

           Summary: Reproducible crash (with test case) wrt templates &
                    @protocols
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


$ cat test.mm
@class NSObject;

class A;
template<class T> class V {};

@protocol Protocol
- (V<A*>)protocolMethod;
@end


@interface I<Protocol>
@end


@implementation I
- (void)randomMethod:(id)info {
  V<A*> vec([self protocolMethod]);
}

- (V<A*>)protocolMethod {
  V<A*> va; return va;
}
@end

$     /Users/thakis/src/llvm/Release/bin/clang -x objective-c++ -c test.mm 
Assertion failed: (DefinitionData && "queried property of class with no
definition"), function data, file
/Users/thakis/src/llvm/tools/clang/lib/Sema/../../include/clang/AST/DeclCXX.h,
line 364.
0  clang             0x01522a28 main + 22118712
1  clang             0x01523786 main + 22122134
2  libSystem.B.dylib 0x905132bb _sigtramp + 43
3  libSystem.B.dylib 0xffffffff _sigtramp + 1873726831
4  libSystem.B.dylib 0x9058723a raise + 26
5  libSystem.B.dylib 0x90593679 abort + 73
6  libSystem.B.dylib 0x905883db __assert_rtn + 101
7  clang             0x0042bce1 main + 4330481
8  clang             0x0043aa83 main + 4391315
9  clang             0x0043e2cc main + 4405724
10 clang             0x007e27f7 main + 8224519
11 clang             0x007e39cb main + 8229083
12 clang             0x007bc25c main + 8067436
13 clang             0x007beac2 main + 8077778
14 clang             0x007bebe6 main + 8078070
15 clang             0x007bef7d main + 8078989
16 clang             0x0079cd43 main + 7939155
17 clang             0x007a12ef main + 7956991
18 clang             0x007ad1c4 main + 8005844
19 clang             0x007ad4f2 main + 8006658
20 clang             0x007eb9d1 main + 8261857
21 clang             0x007ede5b main + 8271211
22 clang             0x007e166a main + 8220026
23 clang             0x0080403b main + 8361803
24 clang             0x00804364 main + 8362612
25 clang             0x00308332 main + 3136066
26 clang             0x00060eb4 main + 353732
27 clang             0x00033657 main + 167271
28 clang             0x00037d9e main + 185518
29 clang             0x00004102 _mh_execute_header + 12546
30 clang             0x0000b5ae main + 3262
31 clang             0x00002636 _mh_execute_header + 5686
Stack dump:
0.    Program arguments: /Volumes/MacintoshHD2/src/llvm/Release/bin/clang -cc1
-triple i386-apple-darwin9.0.0 -emit-obj -mrelax-all -disable-free
-main-file-name test.mm -pic-level 1 -mdisable-fp-elim -masm-verbose
-target-cpu yonah -resource-dir
/Volumes/MacintoshHD2/src/llvm/Release/lib/clang/2.0 -ferror-limit 19
-fmessage-length 281 -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-o test.o -x objective-c++ test.mm 
1.    test.mm:17:34: current parser token ')'
2.    test.mm:16:31: parsing Objective-C method 'I::randomMethod:'
3.    test.mm:16:31: in compound statement ('{}')
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)

The crash goes away if I move the method definition above the method use.

-- 
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 LLVMbugs mailing list