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

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 18:44:48 PST 2020


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


================
Comment at: compiler-rt/lib/gwp_asan/crash_handler.cpp:79
+
+bool __gwp_asan_has_metadata(const gwp_asan::AllocatorState *State,
+                             const gwp_asan::AllocationMetadata *Metadata,
----------------
eugenis wrote:
> Why not return the metadata pointer and null if it could not be found, and then pass it to all other query functions?
The crash handler isn't responsible for finding the metadata, as the original process might be dead. We actually need the metadata here to check that the allocation provided has actually been allocated once upon a time.


================
Comment at: compiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp:53
+    // signal, install the default handler and re-raise the signal in order to
+    // get a core dump and terminate this process.
+    signal(SIGSEGV, SIG_DFL);
----------------
eugenis wrote:
> We should not kill the process if it had SIGSEGV ignored, and we do not recognize the crash.
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