breakpad/src
Primiano Tucci 4d06db5a1f Linux ExceptionHandler: don't allocate the CrashContext on the stack
On Android the size of the alternate stack can be very small (8k).
Even if breakpad uses sigaltstack to increase the size of the alternate
stack during initialization, that call affects only the main thread.
On Android, the libc's pthread initializer reset the sigaltstack to 8k.
When entering a signal handler, the kernel typically pushes the context
on the alternate stack. On arm64, sizeof(CrashContext) is ~5k, which
leaves 3k of usable stack for breakpad.
On top of that, breakpad allocates another struct CrashContext on the
stack. In the case of Android arm64, then, breakpad ends up using
5k + 5k > 8k of stack, which causes a stack overflow.
This got unnoticed in Android L, as the alternate stack didn't have
red-zones between them, so breakpad was often happily overflowing onto
the next thread's stack. This is not the case anymore [1].
This CL moves the CrashContext into a global variable. It should be
safe as the ExceptionHandlers are serialized on a mutex.

[1] 595752f623

BUG=374
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1354923002 .
2015-09-22 09:11:24 +01:00
..
build Rename gyp variable use_titlecase_in_grd_files -> use_titlecase_in_grd. 2014-09-10 12:47:46 +00:00
client Linux ExceptionHandler: don't allocate the CrashContext on the stack 2015-09-22 09:11:24 +01:00
common Fixup a bad strcmp call landed in previous commit 2015-09-16 19:25:35 -04:00
google_breakpad Add check for Linux minidump ending on bad write for exploitability rating. 2015-08-21 16:22:19 +00:00
processor The "CPU architecture" field is being filled from the wrong part of 2015-08-26 16:18:52 +00:00
third_party Fix Mac Breakpad host tools to build in Linux cross-compile 2015-09-16 06:46:55 -04:00
tools Fix Mac Breakpad host tools to build in Linux cross-compile 2015-09-16 06:46:55 -04:00
breakpad_googletest_includes.h disable unittests under ASAN that use memory crashes 2013-12-11 05:38:34 +00:00
config.h.in Use AM_MAINTAINER_MODE so configure supports --enable-maintainer-mode 2013-12-10 12:28:11 +00:00