Increasing the Breakpad stack walker max scan limit from 30 to 40.

Chrome started hitting some crashes in v8 jitted code which happens to be
non ABI compliant and debuggers (including WinDBG) are unable to produce
meaningful stack traces.

The Breakpad stack walker has some builtin heuristics to deal with such cases.
More specifically, when unable to find a good parent frame, it scans the raw
stack to find a suitable parent frame.  The max scan size was set at 30
pointers which was (apparently) not enough to recover in this case.

I'm increasing it to 40 pointers.  I confirmed that at 34 pointers it was able
to recover however I'm setting it to 40 in order to it some slack.

I needed to update two unittests which were expecting the previous scan limit.

BUG=
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1379433005 .
This commit is contained in:
Ivan Penkov 2015-10-05 11:35:09 -07:00
parent 01c8f7cf46
commit f948d8d623
4 changed files with 6 additions and 6 deletions

View file

@ -58,7 +58,7 @@
namespace google_breakpad { namespace google_breakpad {
const int Stackwalker::kRASearchWords = 30; const int Stackwalker::kRASearchWords = 40;
uint32_t Stackwalker::max_frames_ = 1024; uint32_t Stackwalker::max_frames_ = 1024;
bool Stackwalker::max_frames_set_ = false; bool Stackwalker::max_frames_set_ = false;

View file

@ -349,7 +349,7 @@ TEST_F(GetCallerFrame, ScanFirstFrame) {
.D64(0xF0000000) // more junk .D64(0xF0000000) // more junk
.D64(0x0000000D) .D64(0x0000000D)
.Append(256, 0) // more space .Append(336, 0) // more space
.D64(return_address2) // actual return address .D64(return_address2) // actual return address
// (won't be found) // (won't be found)

View file

@ -370,7 +370,7 @@ TEST_F(GetCallerFrame, ScanFirstFrame) {
.D32(0xF0000000) // more junk .D32(0xF0000000) // more junk
.D32(0x0000000D) .D32(0x0000000D)
.Append(96, 0) // more space .Append(136, 0) // more space
.D32(return_address2) // actual return address .D32(return_address2) // actual return address
// (won't be found) // (won't be found)

View file

@ -1228,9 +1228,9 @@ TEST_F(GetCallerFrame, WindowsFPOSystemCall) {
// Scan the stack for a better return address and potentially skip frames // Scan the stack for a better return address and potentially skip frames
// when the calculated return address is not in a known module. Note, that // when the calculated return address is not in a known module. Note, that
// the span of this scan is somewhat arbitrarily limited to 120 search words // the span of this scan is somewhat arbitrarily limited to 160 search words
// for the context frame and 30 search words (pointers) for the other frames: // for the context frame and 40 search words (pointers) for the other frames:
// const int kRASearchWords = 30; // const int kRASearchWords = 40;
// This means that frames can be skipped only when their size is relatively // This means that frames can be skipped only when their size is relatively
// small: smaller than 4 * kRASearchWords * sizeof(InstructionType) // small: smaller than 4 * kRASearchWords * sizeof(InstructionType)
TEST_F(GetCallerFrame, ReturnAddressIsNotInKnownModule) { TEST_F(GetCallerFrame, ReturnAddressIsNotInKnownModule) {