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

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 09:06:49 PST 2020


hctim marked 6 inline comments as done.
hctim added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp:1
+//===-- crash_handler_api.cpp -----------------------------------*- C++ -*-===//
+//
----------------
hctim wrote:
> eugenis wrote:
> > hctim wrote:
> > > New tests for the crash handler API.
> > This test makes my head hurt :(
> > I don't see why it needs to actually send and receive signals to test this API.
> > Also, the fuzzy match logic seems to be testing an implementation of backtrace. This also seems irrelevant. I'd simply supply a mock backtrace callback.
> Let me refactor this to not go through the actual allocator + crashing stuff. I refactored this test from some working branch that had wildly different assumptions.
Refactored.


================
Comment at: compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp:216
+
+  uintptr_t IntPtr = reinterpret_cast<uintptr_t>(Ptr);
+
----------------
eugenis wrote:
> hctim wrote:
> > eugenis wrote:
> > > why not IntPtr = &Intptr ?
> > > 
> > Sorry, I don't follow...
> It looks like the loop above finds any address that GWP-ASan would not recognize in pointerIsMine.
> &IntPtr is such an address.
Done.


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