[LLVMbugs] [Bug 4598] New: clang: ICE on invalid C: pure virtual method called

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jul 21 00:12:48 PDT 2009


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

           Summary: clang: ICE on invalid C: pure virtual method called
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=3229)
 --> (http://llvm.org/bugs/attachment.cgi?id=3229)
testcase-min.i

Using TOT clang I get a "pure virtual method called", and then a clang crash
when compiling the attached C code (which is invalid, and has lots of errors):

$ clang testcase-min.i                                                          
testcase-min.i:6:38: warning: declaration of 'struct cli_bc' will not be
visible outside of this function                        
     int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const
struct cli_bc_func *func, const struct ...        
                                     ^                                          
testcase-min.i:6:57: warning: declaration of 'struct cli_bc_ctx' will not be
visible outside of this function                       
     int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const
struct cli_bc_func *func, const struct ...           
                                                        ^                       
testcase-min.i:6:87: warning: declaration of 'struct cli_bc_func' will not be
visible outside of this function                      
     int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const
struct cli_bc_func *func, const struct ...           
                                                                               
      ^                                             
testcase-min.i:8:15: error: expected '}'                                        
  case 0: do {                                                                  
              ^                                                                 
testcase-min.i:8:15: error: expected '}'                                        
pure virtual method called                                                      
terminate called without an active exception                                    
0   clang-cc        0x00000000011626ff                                          
1   clang-cc        0x0000000001162aed
2   libpthread.so.0 0x0000003fe8a0e700
3   libc.so.6       0x0000003fe7e31d05 gsignal + 53
4   libc.so.6       0x0000003fe7e34dc1 abort + 385
5   libstdc++.so.6  0x00000030052c6dc5 __gnu_cxx::__verbose_terminate_handler()
+ 277
6   libstdc++.so.6  0x00000030052c51f6
7   libstdc++.so.6  0x00000030052c5223
8   libstdc++.so.6  0x00000030052c5aff
9   clang-cc        0x00000000006abc80
10  clang-cc        0x00000000007a25e8
11  clang-cc        0x00000000007a2feb
12  clang-cc        0x00000000007a3406
13  clang-cc        0x00000000007a3bb1
14  clang-cc        0x000000000076a107
15  clang-cc        0x000000000076afd5
16  clang-cc        0x000000000076b170
17  clang-cc        0x000000000076b676
18  clang-cc        0x00000000006117d3
19  clang-cc        0x000000000040d214
20  clang-cc        0x0000000000410e34 main + 3508
21  libc.so.6       0x0000003fe7e1e5a6 __libc_start_main + 230
22  clang-cc        0x000000000040af69
Stack dump:
0.      Program arguments: /usr/local/bin/../libexec/clang-cc -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name testcase-min.i
--relocation-model static --disable-fp-elim --unwind-tables=1 --mcpu=x86-64
--fmath-errno=1 -fdiagnostics-show-option -o /tmp/cc-GHn0wB.s -x cpp-output
testcase-min.i
1.      <eof> parser at end of file
2.      testcase-min.i:6:138: parsing function body 'cli_vm_execute'
3.      testcase-min.i:6:138: in compound statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)


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