[LLVMbugs] [Bug 7075] New: Crashing example: struct{a():}}{

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 6 09:05:36 PDT 2010


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

           Summary: Crashing example: struct{a():}}{
           Product: clang
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4849)
 --> (http://llvm.org/bugs/attachment.cgi?id=4849)
Tiny crashing testcase

clang++ crashes on:
struct{a():}}{

caj at nyanko:~/fuzzed$ clang++ -c t.bashed.26786.cc
t.bashed.26786.cc:1:8: error: C++ requires a type specifier for all
declarations
struct{a():}}{
       ^
t.bashed.26786.cc:1:12: error: expected class member or base class name         
struct{a():}}{
           ^
t.bashed.26786.cc:1:12: error: expected '{' or ','                              
t.bashed.26786.cc:1:11: error: only constructors take base initializers
struct{a():}}{
          ^
t.bashed.26786.cc:1:15: error: expected '}'                                     
struct{a():}}{
              ^
clang: ParseCXXInlineMethods.cpp:237: void
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&): Assertion
`!PP.getSourceManager().isBeforeInTranslationUnit(origLoc, Tok.getLocation())
&& "We consumed more than the cached tokens!"' failed.
0  clang           0x00000000014a52a6
1  clang           0x00000000014a518d
2  libpthread.so.0 0x00007f868af558f0
3  libc.so.6       0x00007f868a245a75 gsignal + 53
4  libc.so.6       0x00007f868a2495c0 abort + 384
5  libc.so.6       0x00007f868a23e941 __assert_fail + 241
6  clang           0x0000000000a8d857
7  clang           0x0000000000a734cf
8  clang           0x0000000000a7136c
9  clang           0x0000000000a65a0a
10 clang           0x0000000000a5ced1
11 clang           0x0000000000a5d317
12 clang           0x0000000000a5cca6
13 clang           0x0000000000a5c57d
14 clang           0x00000000006914dc
15 clang           0x0000000000437558
16 clang           0x00000000004371c3
17 clang           0x00000000004213ef
18 clang           0x0000000000409172
19 clang           0x000000000040dcfe main + 259
20 libc.so.6       0x00007f868a230c4d __libc_start_main + 253
21 clang           0x0000000000407b49
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.bashed.26786.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir /usr/local/lib/clang/2.0
-ferror-limit 19 -fmessage-length 181 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-Mer49r.s -x c++
t.bashed.26786.cc 
1.      <eof> parser at end of file
2.      t.bashed.26786.cc:1:1: parsing struct/union/class body '<anonymous>'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
caj at nyanko:~/fuzzed$ cat t.c^C
caj at nyanko:~/fuzzed$ cat t.bashed.26786.cc
struct{a():}}{

-- 
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