Open
Description
Bugzilla Link | 23549 |
Version | unspecified |
OS | All |
Blocks | #12849 |
CC | @DougGregor,@jyu2-git,@zahiraam |
Extended Description
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