[PATCH] D71497: [GWP-ASan] Add in-proc/out-of-proc crash handler interface.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 16:40:11 PST 2019


hctim created this revision.
hctim added reviewers: vlad.tsyrklevich, pcc, eugenis, cferris.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

This patch describes the shared crash handler interface into GWP-ASan that can
be used by both in-process and out-of-process crash handlers.

This interface yet is to be implemented. This patch is primarily to discuss the
requirements of the interface, and how to expose the metadata in an stable,
robust API. Please review and leave your comments.

Some careful design decisions have been made, and I'll try and identify some
key aspects:

1. Out-of-process crash handlers need to be able to retrieve the requisite information from the crashed process. This API introduces a new (opaque at this time) struct called gwp_asan::AllocatorState. This is designed to be a flat structure (i.e. no internal pointers) that contains all metadata required for these API calls. This is similar to the design of Chromium's GWP-ASan, and will allow us to trivially memcpy() out all required information from the crashed process in order to make these API calls.
2. This API must be stable and backwards compatible. Implementing this into Android must allow libdebuggerd and the Firebase Crashlytics SDK to talk with libc (where GWP-ASan will live) in a stable way. libdebuggerd poses less risk, as the platform version will generally be in sync with libc. Applications built with Crashlytics may be built on vastly different major version of Android.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71497

Files:
  compiler-rt/lib/gwp_asan/crash_handler_interface.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71497.233893.patch
Type: text/x-patch
Size: 7362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191214/ee817393/attachment-0001.bin>


More information about the llvm-commits mailing list