linux/android: add SIGTRAP to the list of signals handled by the client

__builtin_trap() causes a SIGTRAP on arm64 (at least with GCC 4.9).
SIGTRAP is not handled by breakpad, causing crashes induced by
__builtin_trap() to be missed.
Note that on x86 and arm, instead, __builtin_trap() raises a SIGILL,
which is already handled by breakapd.

BUG=chromium:614865
R=vapier@chromium.org

Review URL: https://codereview.chromium.org/2042853002 .
This commit is contained in:
Primiano Tucci 2016-06-08 17:04:49 +01:00
parent 72e94c4ddb
commit a34c929f6f

View file

@ -118,7 +118,7 @@ namespace {
// all these signals must be Core (see man 7 signal) because we rethrow the // all these signals must be Core (see man 7 signal) because we rethrow the
// signal after handling it and expect that it'll be fatal. // signal after handling it and expect that it'll be fatal.
const int kExceptionSignals[] = { const int kExceptionSignals[] = {
SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGTRAP
}; };
const int kNumHandledSignals = const int kNumHandledSignals =
sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]); sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]);