[LLVMbugs] [Bug 23549] New: [MS ABI] Clang doesn't generate local vftables with dllimport

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 16 20:34:08 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23549

            Bug ID: 23549
           Summary: [MS ABI] Clang doesn't generate local vftables with
                    dllimport
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
struct _declspec(dllimport) A {
  A()
  virtual ~A();
};

A *f() { return new A();}

MSVC generates:
This calls 'operator new' and the imported A constructor.  However, it also
overwrites the VFPtr with a so-called "local vftable". I suspect this is to
support overriding the global operator new and delete.

More information is available here:
https://groups.google.com/d/msg/microsoft.public.vc.language/atSh_2VSc2w/EgJ3r_7OzVUJ

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150517/6f4ec447/attachment.html>


More information about the llvm-bugs mailing list