[LLVMbugs] [Bug 5800] New: [tblgen] invalid vtable initialization of object

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Dec 16 00:45:08 PST 2009


           Summary: [tblgen] invalid vtable initialization of object
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu, andersca at mac.com, mrs at apple.com

This code shouldn't link and is the root cause of tblgen crashing on X86, when
it first tries to load from the vtable.
ddunbar at giles:tmp$ cat t.cpp
#include <cstdio>

class RecTy { };

class IntRecTy : public RecTy {
  virtual int *convertValue(int *BI);

void *f0() {
  return new IntRecTy();

int main() {
  void **p = (void**) f0();
  printf("p[0] = %p, p[1] = %p\n", p[0], p[1]);
  return 0;
ddunbar at giles:tmp$ clang++ t.cpp
ddunbar at giles:tmp$ ./a.out
p[0] = 0x0, p[1] = 0x0
ddunbar at giles:tmp$ g++ t.cpp
Undefined symbols:
  "vtable for IntRecTy", referenced from:
      IntRecTy::IntRecTy()in ccXu4I8R.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
ddunbar at giles:tmp$ 

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