breakpad/src/processor
jimblandy 03ebc1d245 Breakpad processor: Fix function and public symbol lookup.
In r480, I botched the change to make the comparisons that decide
whether an address falls within a function's range safe from overflow.
The original code said:

  address >= function_base && address < function_base + function_size

which is fine unless the function abuts the end of the address space,
in which case the addition overflows and you get a false negative.

My change subtracted function_size from both sides of the latter
comparison, which is meaning-preserving in true math, and gets you:

  address >= function_base && address - function_size < function_base

This not only reads strangely, but also still overflows if
function_size is greater than address. That's rare, but I've added a
case to the unit tests that checks it.

My intent had been to replace the addition which could overflow with a
subtraction that was known not to overflow, namely:

  address >= function_base && address - function_base < function_size

This is equivalent to the original in true math, and because of the
first comparison, we know the subtraction won't underflow in MemAddr
math.

The patch includes similar fixes to the public symbol lookup code, and
to FindWindowsFrameInfo, which was the only other function affected by
r480.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@503 4c0a9323-5329-0410-9bdc-e9ce6186880e
2010-01-28 05:17:23 +00:00
..
testdata Breakpad processor: Fix function and public symbol lookup. 2010-01-28 05:17:23 +00:00
address_map_unittest.cc Provide for logging initialization routines (#179). r=bryner 2007-05-25 18:04:17 +00:00
address_map-inl.h Add logging to minidump processor (#82). Part 2: add messages to the rest of 2007-05-21 20:09:33 +00:00
address_map.h Add logging to minidump processor (#82). Part 2: add messages to the rest of 2007-05-21 20:09:33 +00:00
basic_code_module.h Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
basic_code_modules.cc Add logging to minidump processor (#82). Part 2: add messages to the rest of 2007-05-21 20:09:33 +00:00
basic_code_modules.h Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
basic_source_line_resolver_unittest.cc Breakpad processor: Fix function and public symbol lookup. 2010-01-28 05:17:23 +00:00
basic_source_line_resolver.cc Breakpad processor: Fix function and public symbol lookup. 2010-01-28 05:17:23 +00:00
call_stack.cc Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
contained_range_map_unittest.cc Provide for logging initialization routines (#179). r=bryner 2007-05-25 18:04:17 +00:00
contained_range_map-inl.h Fix for issues 296, 297. Various symbol supplier classes need to be updated with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output 2009-02-27 23:59:40 +00:00
contained_range_map.h Add logging to minidump processor (#82). Part 2: add messages to the rest of 2007-05-21 20:09:33 +00:00
linked_ptr.h Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
logging.cc Use "%" PRIx64 instead of "%llx" (#241). r=bryner 2008-02-25 19:32:00 +00:00
logging.h Allow building with -pedantic (#186). r=ted.mielczarek 2007-05-31 19:44:52 +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 issue 170 - Report assertion type in minidump_stackwalk output. r=mark at http://breakpad.appspot.com/45001 2009-12-02 17:43:57 +00:00
minidump_processor_unittest.cc Breakpad processor: Use unsigned constants in comparisons, to quiet compiler warnings. 2009-12-23 22:01:57 +00:00
minidump_processor.cc Basic arm cpu support for processor. r=mark at http://breakpad.appspot.com/49011 2009-12-19 21:43:53 +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 Breakpad: Avoid warnings building with G++ 4.4.1 using -O3 -Wall. 2010-01-12 16:41:13 +00:00
minidump_unittest.cc Breakpad processor: Use unsigned constants in comparisons, to quiet compiler warnings. 2009-12-23 22:01:57 +00:00
minidump.cc Breakpad: Avoid warnings building with G++ 4.4.1 using -O3 -Wall. 2010-01-12 16:41:13 +00:00
pathname_stripper_unittest.cc Fix build errors with gcc 4.4. Patch by Silvius Rus <rus@google.com>. 2009-08-14 18:46:43 +00:00
pathname_stripper.cc Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
pathname_stripper.h Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
postfix_evaluator_unittest.cc Provide for logging initialization routines (#179). r=bryner 2007-05-25 18:04:17 +00:00
postfix_evaluator-inl.h Fix build errors with gcc 4.4. Patch by Silvius Rus <rus@google.com>. 2009-08-14 18:46:43 +00:00
postfix_evaluator.h Fix license boilerplate on these two files. Apparently these were missed 2007-09-26 17:55:53 +00:00
process_state.cc issue 170 - Report assertion type in minidump_stackwalk output. r=mark at http://breakpad.appspot.com/45001 2009-12-02 17:43:57 +00:00
range_map_unittest.cc Breakpad processor: Have RetrieveNearestRange correctly return range extent. 2010-01-27 19:10:06 +00:00
range_map-inl.h Breakpad processor: Have RetrieveNearestRange correctly return range extent. 2010-01-27 19:10:06 +00:00
range_map.h Add logging to minidump processor (#82). Part 2: add messages to the rest of 2007-05-21 20:09:33 +00:00
scoped_ptr.h Rename Airbag to Breakpad. 2007-02-14 19:51:05 +00:00
simple_symbol_supplier.cc Fix for issues 296, 297. Various symbol supplier classes need to be updated with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output 2009-02-27 23:59:40 +00:00
simple_symbol_supplier.h Fix for issues 296, 297. Various symbol supplier classes need to be updated with new overload('make check' was failing, as well as crash_report), and remove logging that was flooding output 2009-02-27 23:59:40 +00:00
stackwalker_amd64.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_amd64.h Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_arm.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_arm.h Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_ppc.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_ppc.h Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +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 Use "%" PRIx64 instead of "%llx" (#241). r=bryner 2008-02-25 19:32:00 +00:00
stackwalker_sparc.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_sparc.h Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_x86.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker_x86.h Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
stackwalker.cc Breakpad processor: Don't pass Windows stack walking information to all walkers. 2010-01-14 19:17:36 +00:00
windows_frame_info.h Issue 49012: Breakpad Processor: Rename 'StackFrameInfo' structure to 'WindowsFrameInfo'. 2009-12-23 22:32:14 +00:00