chapuni added a subscriber: chapuni.
Comment at: lib/CodeGen/CGClass.cpp:1756
@@ +1755,3 @@
+ class SanitizeDtorVTable final : public EHScopeStack::Cleanup {
+const CXXDestructorDecl *Dtor;
+
It causes a warning in -Asserts. [-Wunused-private-field]
http://r
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM
http://reviews.llvm.org/D12712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
nmusgrave updated this revision to Diff 34851.
nmusgrave added a comment.
- Remove commented-out block.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitize-dtor-derived-class.cpp
test/CodeGenCXX/sanitize-dtor-vtable.cpp
Index: test/CodeGenCXX/sanitize-d
nmusgrave updated this revision to Diff 34822.
nmusgrave added a comment.
- Re-checking testing for poisoning vtable.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitize-dtor-derived-class.cpp
test/CodeGenCXX/sanitize-dtor-vtable.cpp
Index: test/CodeGen
nmusgrave updated this revision to Diff 34617.
nmusgrave added a comment.
- Poison vtable in either complete or base dtor.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitize-dtor-derived-class.cpp
test/CodeGenCXX/sanitize-dtor-vtable.cpp
Index: test/Co
nmusgrave updated this revision to Diff 34614.
nmusgrave marked 2 inline comments as done.
nmusgrave added a comment.
- Fixed testing callback emission order to account for vptr.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitize-dtor-derived-class.cpp
eugenis added inline comments.
Comment at: lib/CodeGen/CGClass.cpp:1652
@@ +1651,3 @@
+
+ static void Poison(CodeGenFunction &CGF, llvm::Value *OffsetPtr,
+CharUnits::QuantityType PoisonSize);
nmusgrave wrote:
> eugenis wrote:
> > If it's a glo
nmusgrave marked 2 inline comments as done.
Comment at: lib/CodeGen/CGClass.cpp:1652
@@ +1651,3 @@
+
+ static void Poison(CodeGenFunction &CGF, llvm::Value *OffsetPtr,
+CharUnits::QuantityType PoisonSize);
eugenis wrote:
> If it's a global func
eugenis added a comment.
So, this can not be moved to the complete destructor because that would fail to
poisons vptrs of the base classes. On the other hand, the current
implementation is a bit wasteful, as it can poison the same pointer multiple
times when it is shared by the derived class an
nmusgrave marked an inline comment as done.
Comment at: lib/CodeGen/CGClass.cpp:1685
@@ -1680,3 +1684,3 @@
// Start sanitizing at this field
if (startIndex < 0)
startIndex = fieldIndex;
compiler-rt/test/msan/dtor-multiple-inherit
nmusgrave updated this revision to Diff 34373.
nmusgrave added a comment.
- Cleaned up impl.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitize-dtor-derived-class.cpp
test/CodeGenCXX/sanitize-dtor-vtable.cpp
Index: test/CodeGenCXX/sanitize-dtor-vtable.
eugenis added inline comments.
Comment at: lib/CodeGen/CGClass.cpp:1685
@@ +1684,3 @@
+// function
+Poison(CGF, VTablePtr, PoisonSize);
+ }
Did you mean to move this chunk to the other cleanup class?
Is there a test that would fail if vptr is
nmusgrave marked an inline comment as done.
nmusgrave added a comment.
http://reviews.llvm.org/D12712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nmusgrave updated this revision to Diff 34357.
nmusgrave added a comment.
- Fixed testing callback emission order to account for vptr. Vptr poisoned
after all virtual and member destructors are invoked, in order to prevent a
data race an on the virtual function invoked by a class instance.
(htt
eugenis added inline comments.
Comment at: lib/CodeGen/CGClass.cpp:1671
@@ -1670,1 +1670,3 @@
+ ASTContext &Context = CGF.getContext();
+ // Poison vtable and vtable ptr if they exist for this class.
You are poisoning the vtable pointer in the base des
nmusgrave created this revision.
nmusgrave added reviewers: eugenis, kcc.
nmusgrave added a subscriber: cfe-commits.
After destruction, invocation of virtual functions prevented
by poisoning vtable pointer.
http://reviews.llvm.org/D12712
Files:
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/sanitiz
16 matches
Mail list logo