breakpad/src/client
Lars Volker f25a411200 Fix stack collection with size limit
src/client/linux/minidump_writer/minidump_writer.cc:273 obtains the
stack info by calling GetStackInfo(). That method will return the
stack base address, aligned to the bottom of the memory page that
'stack_pointer' is in. After that it will cap the size of the memory
area to be copied into the minidump to 'max_stack_len', starting from
the base address, if the caller requested so. This will be the case
when collecting reduced stacks, as introduced by this change:
https://breakpad.appspot.com/487002/

In such cases the caller will request 2048 bytes of memory. However
GetStackInfo() will have aligned the base address to the page
boundary, by default 4096 bytes. If the stack, which grows towards the
base address from the top ends before the 2048 bytes of the first
block, then we will not collect any useful part of the stack.

As a fix we skip chunks of 'max_stack_len' bytes starting from
the base address until the stack_pointer is actually contained in the
chunk, which we will add to the minidump file.

BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=695
R=ivanpe@chromium.org

Review URL: https://codereview.chromium.org/1959643004 .

Patch from Lars Volker <lv@cloudera.com>.
2016-05-24 11:49:35 -07:00
..
apple/Framework Mac: Add support for in-process crash reporting to Breakpad. 2014-09-15 22:48:18 +00:00
ios Only release current_breakpad_ if it is defined. 2015-10-14 17:35:47 +02:00
linux Fix stack collection with size limit 2016-05-24 11:49:35 -07:00
mac Remove GTM_ENABLE_LEAKS and GTMGarbageCollection 2016-04-21 13:20:17 -07:00
solaris/handler Use stdint types everywhere 2013-03-06 14:04:42 +00:00
windows Fix Windows crash_generation_server for debug builds without -D_DEBUG 2015-10-07 14:19:23 -04:00
minidump_file_writer-inl.h
minidump_file_writer.cc Android: Workaround for ftruncate() issues. 2015-11-05 15:45:01 -08:00
minidump_file_writer.h Fix the documentation for MinidumpFileWriter::Open(). 2014-05-12 19:36:46 +00:00
minidump_file_writer_unittest.cc Turn on more warnings in ios / mac projects. 2012-09-21 07:58:25 +00:00