eugenis closed this revision.
eugenis added a comment.
http://llvm.org/viewvc/llvm-project?rev=259716=rev
Repository:
rL LLVM
http://reviews.llvm.org/D16823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
eugenis added inline comments.
Comment at: lib/CodeGen/CGClass.cpp:2608
@@ -2607,3 +2607,3 @@
auto TypeId = CGM.CreateCfiIdForTypeMetadata(MD);
if (CGM.getCodeGenOpts().SanitizeCfiCrossDso && TypeId) {
EmitCfiSlowPathCheck(M, BitSetTest, TypeId, CastedVTable,
eugenis updated this revision to Diff 46807.
Repository:
rL LLVM
http://reviews.llvm.org/D16823
Files:
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
test/CodeGen/cfi-check-fail.c
test/CodeGenCXX/cfi-cast.cpp
samsonov accepted this revision.
samsonov added a reviewer: samsonov.
samsonov added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/CodeGen/CGClass.cpp:2608
@@ -2607,3 +2607,3 @@
auto TypeId = CGM.CreateCfiIdForTypeMetadata(MD);
if
eugenis created this revision.
eugenis added reviewers: pcc, kcc.
eugenis added a subscriber: cfe-commits.
eugenis set the repository for this revision to rL LLVM.
Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
eugenis added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:2494
@@ +2493,3 @@
+ llvm::Value *ValidVtable = nullptr;
+ if (CheckAndAppendValidVtable) {
+llvm::Value *AllVtables = llvm::MetadataAsValue::get(
samsonov wrote:
> This is really ugly. Why
samsonov added a subscriber: samsonov.
Comment at: lib/CodeGen/CGExpr.cpp:2494
@@ +2493,3 @@
+ llvm::Value *ValidVtable = nullptr;
+ if (CheckAndAppendValidVtable) {
+llvm::Value *AllVtables = llvm::MetadataAsValue::get(
This is really ugly. Why are you not
eugenis added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:2494
@@ +2493,3 @@
+ llvm::Value *ValidVtable = nullptr;
+ if (CheckAndAppendValidVtable) {
+llvm::Value *AllVtables = llvm::MetadataAsValue::get(
pcc wrote:
> eugenis wrote:
> > samsonov
pcc added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:2494
@@ +2493,3 @@
+ llvm::Value *ValidVtable = nullptr;
+ if (CheckAndAppendValidVtable) {
+llvm::Value *AllVtables = llvm::MetadataAsValue::get(
eugenis wrote:
> samsonov wrote:
> > This is
samsonov added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:2642
@@ +2641,3 @@
+ llvm::MDString::get(CGM.getLLVMContext(), "all-vtables"));
+ llvm::Value *ValidVtable = Builder.CreateZExt(
+ Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::bitset_test),
eugenis updated this revision to Diff 46718.
eugenis added a comment.
Moved bitset.text call outside.
LLVM is smart enough to sink it along the cold branch, so performance should
not suffer.
Repository:
rL LLVM
http://reviews.llvm.org/D16823
Files:
lib/CodeGen/CGClass.cpp
eugenis updated this revision to Diff 46723.
eugenis marked an inline comment as done.
Repository:
rL LLVM
http://reviews.llvm.org/D16823
Files:
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
test/CodeGen/cfi-check-fail.c
eugenis added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:4053
@@ +4052,3 @@
+
+ if (!CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIVCall) ||
+ !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFINVCall) ||
I don't like emitting all these bitset
eugenis added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:2642
@@ +2641,3 @@
+ llvm::MDString::get(CGM.getLLVMContext(), "all-vtables"));
+ llvm::Value *ValidVtable = Builder.CreateZExt(
+ Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::bitset_test),
14 matches
Mail list logo