Poison trivial class members one-by-one in the reverse order of their
construction, instead of all-at-once at the very end.
For example, in the following code access to x from ~B will
produce an undefined value.
struct A {
struct B b; int x;
};
Paths
| Differential D119600
Stricter use-after-dtor detection for trivial members. ClosedPublic Authored by eugenis on Feb 11 2022, 3:14 PM.
Details Summary Poison trivial class members one-by-one in the reverse order of their For example, in the following code access to x from ~B will struct A { struct B b; int x; };
Diff Detail
Event Timelineeugenis added a parent revision: D119300: Use-after-dtor detection for trivial base classes..Feb 16 2022, 3:37 PM This revision is now accepted and ready to land.Feb 25 2022, 11:59 AM This revision was landed with ongoing or failed builds.Mar 16 2022, 6:21 PM Closed by commit rGcb96464f12c4: Stricter use-after-dtor detection for trivial members. (authored by eugenis, committed by vitalybuka). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 408076 clang/lib/CodeGen/CGClass.cpp
clang/test/CodeGenCXX/sanitize-dtor-nontrivial-virtual-base.cpp
clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
|