[PATCH] D15728: [cfi] Support for dlopen and dlclose

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 16:36:56 PST 2016


eugenis added inline comments.

================
Comment at: lib/cfi/cfi.cc:132
@@ +131,3 @@
+  if (main_shadow) {
+    // Update.
+    MprotectReadOnly(shadow_, __cfi_shadow_size);
----------------
pcc wrote:
> Thanks. Is it possible to construct a test case that makes sure we get the memory protection right? I was thinking that the test case would try to write to the shadow at various points (e.g. start of main, after dlopen, after dlclose), and use `%expect_crash` to test that the write fails.
But we don't really want there to be an easy way to find the cfi shadow.



Repository:
  rL LLVM

http://reviews.llvm.org/D15728





More information about the llvm-commits mailing list