When we are adding field paddings for asan even an empty dtor has to remain in the code,
so we ignore -mconstructor-aliases if the paddings are going to be added.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Rafael was touching this last.
Why do we have to avoid aliasing? Note that there are many "aliasing" strategies here: RAUW, normal alias, and aliases in D5 comdat groups.
Comment Actions
We need to emit the actual DTOR instead of replacing it with the base class DTOR, because later in clang codegen this DTOR will be instrumented with __asan_unpoison_intra_object_redzone and its body will become non-empty
Comment Actions
No, even if the target dtor is implemented the derived class will have
extra padding it needs to unpoison. Consider:
struct A {
virtual ~A(); int x[1]; int y[1];
};
struct B {
virtual ~B(); int z[1]; int w[1];
};
B::~B() {}
The B dtor must unpoison the padding between z and w.