[PATCH] D15358: CFI runtime library (cross-DSO support)

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


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

LGTM with nit


================
Comment at: lib/cfi/cfi.cc:177
@@ +176,3 @@
+        fill_shadow(cur_beg, cur_end, cfi_check ? cfi_check : (uptr)(-1));
+      } else {
+        fill_shadow_constant(cur_beg, cur_end, kInvalidShadow);
----------------
Okay, let's not make things too complicated to start with. I'm happy with how things stand at the moment, but I think we should eventually resolve this by doing the refactoring.

================
Comment at: lib/cfi/cfi.cc:248
@@ +247,3 @@
+  VReport(1, "CFI: VMA size %zx, shadow size %zx\n", vma, shadow_size);
+  void *shadow = MmapNoReserveOrDie(shadow_size, "CFI shadow");
+  VReport(1, "CFI: shadow at %zx .. %zx\n", shadow,
----------------
Won't this request one fewer byte than needed? This might not actually matter, as `MmapNoReserveOrDie` rounds up to the page size, but I think we should at least leave a comment here.


Repository:
  rL LLVM

http://reviews.llvm.org/D15358





More information about the llvm-commits mailing list