[PATCH] D73557: [GWP-ASan] Crash Handler API.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 15:30:33 PST 2020


hctim added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:194
+  // Raise a SEGV by touching the guard page closest on the left hand size.
+  volatile char *p = reinterpret_cast<char*>(getPageAddr(Address, State.PageSize) - 1);
+  *p = 0;
----------------
eugenis wrote:
> Could be simply the first guard page at *GuardPagePool. Does not really matter.
Sure. Done.


================
Comment at: compiler-rt/lib/gwp_asan/tests/harness.h:19
 #include "gwp_asan/options.h"
+#include "gwp_asan/optional/segv_handler.h"
 
----------------
eugenis wrote:
> this does not exist
it does, just under the GWP-ASan root's `gwp_asan/optional` dir, not `gwp_asan/tests/optional/`


================
Comment at: compiler-rt/lib/gwp_asan/tests/harness.h:94
+    GPA.uninitTestOnly();
+    gwp_asan::crash_handler::uninstallSignalHandlers();
+  }
----------------
eugenis wrote:
> Not a big deal, but it makes sense to do these things in the opposite order.
Done (and in Scudo).


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:12
 
+#include "/usr/local/google/home/mitchp/llvm/compiler-rt/lib/gwp_asan/optional/segv_handler.h"
 #include "chunk.h"
----------------
eugenis wrote:
> wrong path
why does my editor hate me so


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73557/new/

https://reviews.llvm.org/D73557





More information about the llvm-commits mailing list