-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:to-be-triagedShould not be used for new issuesShould not be used for new issuesextension:microsoft
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:to-be-triagedShould not be used for new issuesShould not be used for new issuesextension:microsoft