[PATCH] D15367: Cross-DSO control flow integrity (Clang part)
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 14:46:58 PST 2015
pcc added inline comments.
================
Comment at: lib/CodeGen/CGExpr.cpp:2558
@@ +2557,3 @@
+ false));
+ llvm::MDString *MDS = dyn_cast<llvm::MDString>(MD);
+ llvm::Constant *TypeId =
----------------
What happens if `MD` is not an `MDString`?
================
Comment at: lib/CodeGen/CodeGenModule.cpp:998
@@ -986,1 +997,3 @@
+ if (!CodeGenOpts.SanitizeCfiCrossDso)
+ EmitFunctionBitSetEntry(FD, F);
}
----------------
I would move the logic back here and make the check for definedness etc explicit. We shouldn't emit a bitset entry if the function has `available_externally` linkage for example.
Repository:
rL LLVM
http://reviews.llvm.org/D15367
More information about the cfe-commits
mailing list