[PATCH] D119600: Stricter use-after-dtor detection for trivial members.
Evgenii Stepanov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 11 15:14:50 PST 2022
eugenis created this revision.
eugenis added reviewers: vitalybuka, kda.
eugenis requested review of this revision.
Herald added a project: clang.
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;
};
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119600
Files:
clang/lib/CodeGen/CGClass.cpp
clang/test/CodeGenCXX/sanitize-dtor-nontrivial-virtual-base.cpp
clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119600.408076.patch
Type: text/x-patch
Size: 17328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220211/526987f4/attachment-0001.bin>
More information about the cfe-commits
mailing list