breakpad/src/processor
ivan.penkov@gmail.com fd9f3d8b17 Use register %ebp (instead of %esp) when calculating the value of
.raSearchStart in the cases where there are alignment operators in
the program string.

If alignment operators are found in the program string, the current
value of %ebp must be valid and it is the only reliable data point
that can be used for getting to the previous frame.  Previously, the
.raSearchStart calculation was based on %esp and when %esp is aligned
in the current frame (which is a lossy operation) the resulting
.raSearchStart cannot was incorrect.  There is code that is trying to
work around this problem (scanning of up to 3 words for a return
address) which is unreliable and it doesn't work in many cases (e.g.
when the alignment is on a 64-byte boundary).

This fix is already deployed in Google and it was measured to reduce
the number of wrong stack traces (for Windows crashes) by 45%. No
regressions have been found so far.

Here is an example of an issue that was fixed by this change (where
register %esp is aligned on the 64-byte boundary and the workarounds
that we already had didn't work):

https://code.google.com/p/chromium/issues/detail?id=311359

0:013> uf chrome_59630000!base::MessagePumpForIO::DoRunLoop
  518 59685c39 55      push    ebp
  518 59685c3a 8bec    mov     ebp,esp
  518 59685c3c 83e4c0  and     esp,0FFFFFFC0h  <== 64-byte boundary
  518 59685c3f 83ec34  sub     esp,34h
  518 59685c42 53      push    ebx
  518 59685c43 56      push    esi

Program string contains 64-byte alignment:
$T1 .raSearch = $T0 $T1 4 - 64 @ = $ebp $T1 4 - ^ = $eip $T1 ^ = 
$esp $T1 4 + = $20 $T0 56 - ^ =  $23 $T0 60 - ^ =  $24 $T0 64 - ^ =
Review URL: https://breakpad.appspot.com/694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1232 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-05 23:50:49 +00:00
..
proto Remove proto generated source files from svn. 2010-09-08 23:36:54 +00:00
testdata Add some symbols missing from my last commit. 2013-10-29 20:16:46 +00:00
address_map_unittest.cc Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
address_map-inl.h Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
address_map.h FastSourceLineResolver implementation for optimization purpose. 2010-10-21 17:13:01 +00:00
basic_code_module.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
basic_code_modules.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
basic_code_modules.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
basic_source_line_resolver_types.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
basic_source_line_resolver_unittest.cc Adding stricter validation checks to various symbol parser functions. 2013-09-25 18:25:13 +00:00
basic_source_line_resolver.cc Adding stricter validation checks to various symbol parser functions. 2013-09-25 18:25:13 +00:00
binarystream_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
binarystream.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
binarystream.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
call_stack.cc Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
cfi_frame_info_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
cfi_frame_info-inl.h Fix a sizeof(pointer) vs sizeof(pointee) issue caught by client. 2011-07-21 21:38:01 +00:00
cfi_frame_info.cc Fix some more Win32 compat issues in processor code 2013-03-06 14:06:52 +00:00
cfi_frame_info.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
contained_range_map_unittest.cc Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
contained_range_map-inl.h Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
contained_range_map.h FastSourceLineResolver implementation for optimization purpose. 2010-10-21 17:13:01 +00:00
disassembler_x86_unittest.cc Cleanup: Remove duplicate wording in license headers. 2013-04-23 23:18:39 +00:00
disassembler_x86.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
disassembler_x86.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
exploitability_linux.cc Add simple exploitability analysis for Linux crashes. 2013-10-29 20:03:39 +00:00
exploitability_linux.h Add simple exploitability analysis for Linux crashes. 2013-10-29 20:03:39 +00:00
exploitability_unittest.cc Add simple exploitability analysis for Linux crashes. 2013-10-29 20:03:39 +00:00
exploitability_win.cc Fix an "unused variable" compiler warning in exploitability_win.cc 2013-05-06 23:27:28 +00:00
exploitability_win.h Added the base exploitability module for windows. This only adds the very basic exception type based analysis for now. 2010-09-22 02:37:19 +00:00
exploitability.cc Add simple exploitability analysis for Linux crashes. 2013-10-29 20:03:39 +00:00
fast_source_line_resolver_types.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
fast_source_line_resolver_unittest.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
fast_source_line_resolver.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
linked_ptr.h Fix processor to build with clang 2012-09-10 19:46:19 +00:00
logging.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
logging.h Add support for configuring the minimum log level at compile time 2013-11-05 19:43:48 +00:00
map_serializers_unittest.cc map_serializers_unittest: fix unused variable warning 2013-10-30 17:16:38 +00:00
map_serializers-inl.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
map_serializers.h Make memory allocation/deallocation consistent: use new char[] instead of operator new() 2010-11-03 23:54:01 +00:00
minidump_dump_test Suppress handler thread from appearing in MinidumpProcessor's ProcessState 2006-11-06 23:00:19 +00:00
minidump_dump.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
minidump_processor_unittest.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
minidump_processor.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
minidump_stackwalk_machine_readable_test Add module list to machine-readable minidump_stackwalk output (#119). 2007-01-29 21:30:31 +00:00
minidump_stackwalk_test minidump_stackwalk should use MinidumpProcessor (#64). r=bryner 2006-10-27 00:40:56 +00:00
minidump_stackwalk.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
minidump_unittest.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
minidump.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
module_comparer.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
module_comparer.h FastSourceLineResolver implementation for optimization purpose. 2010-10-21 17:13:01 +00:00
module_factory.h FastSourceLineResolver implementation for optimization purpose. 2010-10-21 17:13:01 +00:00
module_serializer.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
module_serializer.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
pathname_stripper_unittest.cc Breakpad: Avoid using the C++ <cfoo> headers. 2010-06-25 16:57:07 +00:00
pathname_stripper.cc Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
pathname_stripper.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
postfix_evaluator_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
postfix_evaluator-inl.h Handle program strings with the assignment operator smashed against the next 2012-02-23 22:41:36 +00:00
postfix_evaluator.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
process_state.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
range_map_unittest.cc Move scoped_ptr.h to common 2013-01-17 15:53:56 +00:00
range_map-inl.h Turn off verbose logging but keep logic for future reference for debug logging. 2013-04-05 00:53:45 +00:00
range_map.h FastSourceLineResolver implementation for optimization purpose. 2010-10-21 17:13:01 +00:00
simple_serializer-inl.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
simple_serializer.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
simple_symbol_supplier.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
simple_symbol_supplier.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
source_line_resolver_base_types.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
source_line_resolver_base.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
stack_frame_symbolizer.cc Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
stackwalker_address_list_unittest.cc Make StackWalkerAddressList use FRAME_TRUST_PREWALKED trust level. 2013-09-04 20:43:10 +00:00
stackwalker_address_list.cc Make StackWalkerAddressList use FRAME_TRUST_PREWALKED trust level. 2013-09-04 20:43:10 +00:00
stackwalker_address_list.h Create StackwalkerAddressList. 2013-08-23 14:38:36 +00:00
stackwalker_amd64_unittest.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_amd64.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_amd64.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_arm_unittest.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_arm.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_arm.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_mips_unittest.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
stackwalker_mips.cc This patch adds required change for stackwalker_mips_unittest to pass on 64bit 2013-09-30 09:34:55 +00:00
stackwalker_mips.h Adding support for mips. 2013-09-11 11:37:04 +00:00
stackwalker_ppc64.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_ppc64.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_ppc.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_ppc.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_selftest_sol.s Add SPARC/Solaris support to client handler and processor (#201, 200). 2007-09-26 18:28:05 +00:00
stackwalker_selftest.cc Keeping track of modules without symbols during crash report processing. 2013-03-06 19:32:13 +00:00
stackwalker_sparc.cc Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_sparc.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker_unittest_utils.h Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible. 2013-07-11 01:36:06 +00:00
stackwalker_x86_unittest.cc Use register %ebp (instead of %esp) when calculating the value of 2013-11-05 23:50:49 +00:00
stackwalker_x86.cc Use register %ebp (instead of %esp) when calculating the value of 2013-11-05 23:50:49 +00:00
stackwalker_x86.h Allow setting a limit on the number of frames to be recovered by stack scanning. 2013-08-19 18:31:51 +00:00
stackwalker.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
static_address_map_unittest.cc This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
static_address_map-inl.h Add static version of map wrappers and corresponding serializers. 2010-10-15 20:36:31 +00:00
static_address_map.h Add static version of map wrappers and corresponding serializers. 2010-10-15 20:36:31 +00:00
static_contained_range_map_unittest.cc Move scoped_ptr.h to common 2013-01-17 15:53:56 +00:00
static_contained_range_map-inl.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_contained_range_map.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_map_iterator-inl.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_map_iterator.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_map_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_map-inl.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_map.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
static_range_map_unittest.cc Move scoped_ptr.h to common 2013-01-17 15:53:56 +00:00
static_range_map-inl.h Add static version of map wrappers and corresponding serializers. 2010-10-15 20:36:31 +00:00
static_range_map.h Cleaning up google-breakpad source code of signed-unsigned comparison warnings 2012-11-21 01:33:08 +00:00
synth_minidump_unittest_data.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
synth_minidump_unittest.cc Use stdint types everywhere 2013-03-06 14:04:42 +00:00
synth_minidump.cc Adding support for mips. 2013-09-11 11:37:04 +00:00
synth_minidump.h Adding support for mips. 2013-09-11 11:37:04 +00:00
tokenize.cc Fix a clang warning: 2013-06-28 20:45:10 +00:00
tokenize.h This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h 2012-06-28 22:46:01 +00:00
windows_frame_info.h Fix some more Win32 compat issues in processor code 2013-03-06 14:06:52 +00:00