Call the debuggerd first chance handler in sigchain for recoverable GWP-ASan

Recoverable GWP-ASan is a new feature in Android U that allows GWP-ASan
to detect use-after-free and heap-buffer-overflow (like it currently
does), and for a bug report to be printed, but *now* the app that
contained the bug won't crash.

This may allow us to deploy GWP-ASan as an opt-out feature, rather than
an opt-in feature as it currently is. Previously, AppCompat meant that
we couldn't have opt-in GWP-ASan, because an OS upgrade could now cause
"working before" (just with silent memory corruption) apps to suddenly
crash.

Bug: 247012630

Test: Patch an OS build with aosp/2394588, then use `setprop
libc.debug.gwp_asan.recoverable.com.sanitizers.app.none true` (where
com.sanitizers.app.none is an app that can trigger a use-after-free) to
enable recoverable GWP-ASan. Then, trigger the use-after-free, and make
sure that the sigchain handler calls the debuggerd handler first,
returning from sigchain.

Change-Id: I01ff2ad6bf16cbebec4e86156d5a0357b1f98e59
1 file changed