[PATCH] D15365: Cross-DSO control flow integrity (LLVM part)

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 18:09:48 PST 2015


pcc added inline comments.

================
Comment at: lib/Transforms/IPO/CrossDSOCFI.cpp:112
@@ +111,3 @@
+      FunctionType::get(
+          Type::getVoidTy(Ctx),
+          {Type::getInt64Ty(Ctx), PointerType::getUnqual(Type::getInt8Ty(Ctx))},
----------------
It can be a requirement but we shouldn't produce invalid IR if it happens. I think the easiest thing to do is to return nullptr from CrossDSOCFI::extractBitSetTypeId if the ConstantInt is not i64.

================
Comment at: test/Transforms/CrossDSOCFI/basic.ll:5
@@ +4,3 @@
+; CHECK:     switch i64 %[[TYPE]], label %[[TRAP:.*]] [
+; CHECK:   i64 111, label
+; CHECK:   i64 222, label
----------------
You can test for the label names as well (here and below).


Repository:
  rL LLVM

http://reviews.llvm.org/D15365





More information about the llvm-commits mailing list