[PATCH] D17360: [cfi] Fix handling of sanitize trap/recover flags in the cross-DSO CFI mode.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 10 14:27:04 PST 2016


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/CodeGen/CGExpr.cpp:2484-2485
@@ -2483,3 +2483,4 @@
   CheckRecoverableKind RecoverKind = getRecoverableKind(Checked[0].second);
   // In cross-DSO CFI mode this code is used to generate __cfi_check_fail, which
   // includes all checks, even those that are not in SanOpts.
+  assert(SanOpts.has(Checked[0].second));
----------------
You can remove this comment now.

================
Comment at: lib/CodeGen/CGExpr.cpp:2677
@@ -2677,1 +2676,3 @@
+    else
+      EmitTrapCheck(Cond);
   }
----------------
I mentioned failing open, but yes, it's probably better to fail closed.


Repository:
  rL LLVM

http://reviews.llvm.org/D17360





More information about the cfe-commits mailing list