aboutsummaryrefslogtreecommitdiff
path: root/src/processor
Commit message (Collapse)AuthorAgeFilesLines
* Dump Crashpad extension structures in minidump_dumpMark Mentovai2017-09-272-16/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | This is currently mostly useful to expose the annotations that Crashpad stores in minidumps. Example output: MDRawCrashpadInfo version = 1 report_id = 01234567-89ab-cdef-0123-456789abcdef client_id = fedcba98-7654-3210-fedc-ba9876543210 simple_annotations["channel"] = canary simple_annotations["plat"] = OS X simple_annotations["prod"] = Chrome_Mac simple_annotations["ver"] = 59.0.3069.0 module_list[0].minidump_module_list_index = 0 module_list[0].version = 1 module_list[0].simple_annotations["ptype"] = crashpad-handler module_list[1].minidump_module_list_index = 28 module_list[1].version = 1 module_list[1].list_annotations[0] = abort() called Change-Id: I00ba291f93ea3a37fc3754c651b3ccc542e5b8b2 Reviewed-on: https://chromium-review.googlesource.com/688416 Reviewed-by: Robert Sesek <rsesek@chromium.org>
* Fix MSVC build on 64-bitOrgad Shaneh2017-09-252-9/+9
| | | | | | | | | | | Mostly int<->size_t implicit conversions. Warning 4366 (The result of the unary '&' operator may be unaligned) appears in minidump.cc:907, but I don't know why. It looks aligned to me. Change-Id: I641942adc324f8f9832b20662083dc83498688a8 Reviewed-on: https://chromium-review.googlesource.com/637390 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Fix googletest/googlemock buildMark Mentovai2017-09-191-2/+2
| | | | | | | | | | | | | | 1. testing.gyp is a gyp file, not a gypi file. It is only referenced in “dependencies” sections. The gypi extension is used for files that are included by an “includes” section. 2. Update paths in testing.gyp to reflect the real locations of googletest and googlemock following their merge into a single repository. Change-Id: If9c356d93aa5ffda54af46fbed648baa2274dac6 Reviewed-on: https://chromium-review.googlesource.com/673404 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Increase the maximum number of modules allowed in minidumps.Tobias Sargeant2017-09-011-3/+3
| | | | | | | Bug: google-breakpad:743 Change-Id: I2e40b5cc36c012c18a1c4637634fb139b0d8e14d Reviewed-on: https://chromium-review.googlesource.com/647886 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix memory leak in ppc64 stackwalkerTobias Sargeant2017-08-301-2/+3
| | | | | | | | BUG=757166 Change-Id: I967a6903332b9c3d16b583f7fa4d3c9c44c2f729 Reviewed-on: https://chromium-review.googlesource.com/643267 Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
* Add crash reason extraction to microdump processorTobias Sargeant2017-08-214-1/+1453
| | | | | | | | BUG=754715 Change-Id: I00fe62ed06dbbab4c8f6c416d56e2d444be11571 Reviewed-on: https://chromium-review.googlesource.com/621307 Reviewed-by: Robert Sesek <rsesek@chromium.org>
* Fix memory leak in ppc stackwalkerTobias Sargeant2017-08-181-2/+3
| | | | | | | | BUG=756317 Change-Id: Id096372e5a0d1e7c70e95304b1f0c181f57d3882 Reviewed-on: https://chromium-review.googlesource.com/619126 Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
* Increase maximum number of regions for minidump_stackwalk.Lars Volker2017-07-281-1/+3
| | | | | | | | | | Change I361d8812df7b2977fe2630289059d31c3c9a4cc3 increased the maximum number of threads for minidump_stackwalk. This change also increases the maximum number of regions. Change-Id: I61efd4453df8809bd9cd657546d1d6727cd10281 Reviewed-on: https://chromium-review.googlesource.com/588384 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Handle very large stack tracesLeonard Mosescu2017-07-1212-78/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main motivation for this change is to handle very large stack traces, normally the result of infinite recursion. This part is actually fairly simple, relaxing a few self-imposed limits on how many frames we can unwind and the max size for stack memory. Relaxing these limits requires stricter and more consistent checks for stack unwinding. There are a number of unwinding invariants that apply to all the platforms: 1. stack pointer (and frame pointer) must be within the stack memory (frame pointer, if preset, must point to the right frame too) 2. unwinding must monotonically increase SP (except for the first frame unwind, this must be a strict increase) 3. Instruction pointer (return address) must point to a valid location 4. stack pointer (and frame pointer) must be appropriately aligned This change is focused on 2), which is enough to guarantee that the unwinding doesn't get stuck in an infinite loop. 1) is implicitly validated part of accessing the stack memory (explicit checks might be nice though). 4) is ABI specific and while it may be valuable in catching suspicious frames is not in the scope of this change. 3) is also an interesting check but thanks to just-in-time compilation it's more complex than just calling StackWalker::InstructionAddressSeemsValid() and we don't want to drop parts of the callstack due to an overly conservative check. Bug: chromium:735989 Change-Id: I9aaba77c7fd028942d77c87d51b5e6f94e136ddd Reviewed-on: https://chromium-review.googlesource.com/563771 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* A couple of minor fixesLeonard Mosescu2017-07-111-3/+3
| | | | | | | | | | | | | | | | 1. Fixing ExceptionHandlerTest.FirstChanceHandlerRuns: exit() is not an async-signal-safe function (http://man7.org/linux/man-pages/man7/signal-safety.7.html) 2. Fixing entry point signature in minidump_dump Changed "const char* argv[]" to "char* argv[]" to match the standard entry point signature 3. Updating .gitignore to exclude unit test artifacts Change-Id: I9662898d0bd97769621fb6476a720105821c60f0 Reviewed-on: https://chromium-review.googlesource.com/562356 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Ivan Penkov <ivanpe@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Increase maximum number of threads for minidump_stackwalk.Lars Volker2017-03-281-0/+4
| | | | | | | | BUG= Change-Id: I361d8812df7b2977fe2630289059d31c3c9a4cc3 Reviewed-on: https://chromium-review.googlesource.com/459010 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* minidump_dump: fix up init pathsMike Frysinger2017-03-252-3/+5
| | | | | | | | | | Fix some build & test failures in the previous minidump_dump code. BUG=chromium:598947 Change-Id: Ia8fce453265167368de96747a8a92af930e78245 Reviewed-on: https://chromium-review.googlesource.com/458881 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* minidump_dump: dump stack memory like hexdumpMike Frysinger2017-03-242-13/+82
| | | | | | | | | | | | | | | The current stack output is one line byte string which is not easy for humans to parse. Extend the print mode to support a hexdump-like view and switch to that by default. Now we get something like: Stack 00000000 20 67 7b 53 94 7f 00 00 01 00 00 00 00 00 00 00 | g{S...........| 00000010 00 70 c4 44 9a 25 00 00 08 65 7a 53 94 7f 00 00 |.p.D.%...ezS...| BUG=chromium:598947 Change-Id: I868e1cf4faa435a14c5f1c35f94a5db4a49b6a6d Reviewed-on: https://chromium-review.googlesource.com/404008 Reviewed-by: Mark Mentovai <mark@chromium.org>
* minidump_dump: add proper cli processingMike Frysinger2017-03-241-8/+53
| | | | | | | | | | | | In preparation for adding more flexibility to this tool, add a proper parser for the command line flags. This uses the style as seen in other breakpad tools. BUG=chromium:598947 Change-Id: I95495e6ca7093be34d0d426f98a6c22880ff24a3 Reviewed-on: https://chromium-review.googlesource.com/457019 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Sanity check frame pointer while stackwalkingJoshua Peraza2017-03-222-1/+8
| | | | | | | | BUG= Change-Id: Ib9b0fd5ba7f829f8be8cf856ab371c6540279ee5 Reviewed-on: https://chromium-review.googlesource.com/458526 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* dump_context: arm: name the registers in the dump outputMike Frysinger2017-03-181-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current ARM minidump_dump output makes people remember or look up how registers are mapped in the ISA. Let's use human friendly names instead so they don't have to. Currently it looks like: MDRawContextARM context_flags = 0x40000006 iregs[ 0] = 0x3c48b000 iregs[ 1] = 0x3 iregs[ 2] = 0x20 iregs[ 3] = 0x0 iregs[ 4] = 0x1c iregs[ 5] = 0x3c48b000 iregs[ 6] = 0x20 iregs[ 7] = 0x3c48b04c iregs[ 8] = 0x39100611 iregs[ 9] = 0x1c iregs[10] = 0x0 iregs[11] = 0xbe61c200 iregs[12] = 0xfb9c1fec iregs[13] = 0xbe61bd28 iregs[14] = 0x39e19b1c iregs[15] = 0x357dd74c cpsr = 0x680b0010 float_save.fpscr = 0x0 Now it looks like: MDRawContextARM context_flags = 0x40000006 r0 = 0x3c48b000 r1 = 0x3 r2 = 0x20 r3 = 0x0 r4 = 0x1c r5 = 0x3c48b000 r6 = 0x20 r7 = 0x3c48b04c r8 = 0x39100611 r9 = 0x1c r10 = 0x0 r11 = 0xbe61c200 r12 = 0xfb9c1fec sp = 0xbe61bd28 lr = 0x39e19b1c pc = 0x357dd74c cpsr = 0x680b0010 float_save.fpscr = 0x0 BUG=chromium:665083 Change-Id: I46d87c4ff7303a7efcd60da1d0b67ae7a5465c8f Reviewed-on: https://chromium-review.googlesource.com/457197 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* [MIPS]: Don't terminate stackwalk when $sp value doesn't change between framesDragan Mladjenovic2017-03-163-7/+1
| | | | | | | | | Currently on MIPS we accidentally terminate stackwalk if $sp value doesn't change between frames which results in incomplete callchain terminated at the point of first tailcall encountered. Change-Id: I8f1ed1df958d8f0a9eb11fd7800062184d8f1ee2 Reviewed-on: https://chromium-review.googlesource.com/449755 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix segfault when interpreting bad debug_fileJoshua Peraza2017-03-081-1/+3
| | | | | | | | BUG=chromium:661037 Change-Id: Ia4da0bd9787c232a6a199cfdfccfbed60c2515c2 Reviewed-on: https://chromium-review.googlesource.com/450090 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Fix compile errors arising from compiling breakpad with clang.Tobias Sargeant2017-02-171-16/+17
| | | | | | | | | | | | | | | | | | | | | These compile errors occur when building the check target with: CXX=clang++-3.8 CXXFLAGS="-Werror -Wconstant-conversion -g -O2 -std=c++11" src/processor/stackwalker_mips.cc:60:9: error: comparison of constant 18446744073709551615 with expression of type 'bool' is always false [Werror,-Wtautological-constant-out-of-range-compare] > 0xffffffffffffffff) { ^ ~~~~~~~~~~~~~~~~~~ src/processor/stackwalker_mips.cc:68:66: error: comparison of constant 4294967295 with expression of type 'bool' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if ((memory_ && memory_->GetBase() + memory_->GetSize() - 1) > 0xffffffff) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ Change-Id: I29eed8f4a67b9feeb274aa1fc6c79a019135e8d6 Reviewed-on: https://chromium-review.googlesource.com/438445 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* processor: drop set-but-unused variableMike Frysinger2017-02-121-4/+2
| | | | | | Change-Id: Idf3fe363c76734caa3e6a6cc20a53fd1d661188d Reviewed-on: https://chromium-review.googlesource.com/438564 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fixed leak of unloaded module lists.Joshua Peraza2017-02-072-2/+6
| | | | | | | | BUG= Change-Id: I6d03820082f793a2eac3c3c2abd184b4acf66aa4 Reviewed-on: https://chromium-review.googlesource.com/438755 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Revert "Several fixes for broken Mac build"Roman Margold2017-02-012-4/+4
| | | | This reverts commit 5c521532fc0a1b65f42c0d61d2da206eadf318b8.
* Several fixes for broken Mac buildRoman Margold2017-02-012-4/+4
|
* Fixed a bug where cv record size was not correctly checked.Joshua Peraza2017-01-301-4/+6
| | | | | | | | BUG= Change-Id: I6c1d78cfe344c7b90a03f6df35193d67623bfd89 Reviewed-on: https://chromium-review.googlesource.com/434094 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Populate stack frames with unloaded module info.Joshua Peraza2017-01-1910-9/+138
| | | | | | | | | | | | | | | | | | | This CL hits lots of source files because: 1. An update to the CodeModule virtual class. I added an is_loaded method to specify whether the module is loaded. There were several mocks/test classes that needed to be updated with an implementation. An alternative to this route would be to modify MinidumpUnloadedModule::code_file to prepend "Unloaded_" to the module name. 2. Added an unloaded_modules parameter to StackFrameSymbolizer::FillSourceLineInfo. BUG= Change-Id: Ic9c7f7c7b7e932a154a5d4ccf292c1527d8da09f Reviewed-on: https://chromium-review.googlesource.com/430241 Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
* Added classes to support reading unloaded module lists in minidumps.Joshua Peraza2016-12-164-1/+558
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementations of Module/UnloadedModule and ModuleList/UnloadedModuleList are very similar. They have been made separate classes because they operate on different structs, complicating factoring code into a base class and have sufficiently different implementation that templates would not be suitable. When unloaded modules have partially overlapping ranges, the module shrink down feature is used to move the start of the higher range to the end of the lower range. If two unloaded modules overlap identically, the second module will not be added to the range map and the failure ignored. Places where MinidumpUnloadedModule differs from MinidumpModule: code_identifier: the android/linux case is deleted since cv_records never exist. debug_file/debug_identifier/version: always return empty strings. Read: an expected size is provided as opposed to MD_MODULE_SIZE. A seek is used if there are extra, unused bytes. Places where MinidumpUnloadedModuleList differs from MinidumpModuleList: Read: entry and header size is provided in the header in addition to count. This changes the checks and handling of padding. Failures from StoreRange are ignored. GetMainModule: always returns NULL. BUG= Change-Id: I52e93d3ccc38483f50a6418fede8b506ec879aaa Reviewed-on: https://chromium-review.googlesource.com/421566 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Remove comparison of this with nullptrOrgad Shaneh2016-12-062-13/+9
| | | | | | | | GCC6 optimizes it out, leading to crash. Change-Id: I8425d456c1364929d135ce3860121b8098bab1f7 Reviewed-on: https://chromium-review.googlesource.com/413120 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* microdump_stackwalk_test: fix bashism in testMike Frysinger2016-11-252-2/+2
| | | | | | | | | These are /bin/sh scripts, and `source` is a bash-specific command. Switch to the portable `.` command instead. Change-Id: I51d8253b26aa61c130bb5fdc4789f8d623c6d9db Reviewed-on: https://chromium-review.googlesource.com/414524 Reviewed-by: Primiano Tucci <primiano@chromium.org>
* Update linksOrgad Shaneh2016-11-182-5/+5
| | | | | | | | | | code.google.com is obsolete. Fix all broken markdown links while at it. Change-Id: I6a337bf4b84eacd5f5c749a4ee61331553279009 Reviewed-on: https://chromium-review.googlesource.com/411800 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add a crash reason string for the simulated crashpad exception codePierre-Antoine Manzagol2016-11-101-0/+6
| | | | | | | | BUG= Change-Id: I19a1abf1d00f208943db1c362cc426ca8bd2068e Reviewed-on: https://chromium-review.googlesource.com/409632 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Allow compiling the google-breakpad code using a global ::string class ↵Ivan Penkov2016-11-083-3/+3
| | | | | | | | | | | | instead of std::string. For more details take a look at common/using_std_string.h BUG= Change-Id: Ifebfc57f691ef3a3bef8cfed7106c567985edffc Reviewed-on: https://chromium-review.googlesource.com/399738 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Generate reason for bad function table exceptionMike Wittman2016-10-271-0/+3
| | | | | | | | | | This exception is being seen in Chrome during stack unwinding. BUG= Change-Id: Ica3f721ca605dff835ffc3814c60bab9f6f9b192 Reviewed-on: https://chromium-review.googlesource.com/404332 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix iterating over the MDXStateFeature entries on 32-bit hostsGabriele Svelto2016-10-181-1/+1
| | | | | | | | | | | On 32-bit hosts the new code for dumping version 5 of the MDRawMiscInfo structure uses a 32-bit left shift to select flags corresponding to the entries in the MDXStateFeature array. Since the array is made of 64 element this automatically skipped half of it. Change-Id: Ic4e3beaf6c56083524b33da9a396c14eec0d2bd2 Reviewed-on: https://chromium-review.googlesource.com/396107 Reviewed-by: Ted Mielczarek <ted@mielczarek.org>
* Provide initial EBX value to FPO frame data evaluatorScott Graham2016-10-142-6/+153
| | | | | | | | | | | | | EBX is sometimes used in "WIN FRAME 4" programs. Not providing the initial value was causing the evaluation in some frames of ntdll, resulting in a fallback to scanning and a failed stack walk. R=mark@chromium.org BUG=chromium:651453 Change-Id: I94a8184e1eed72b0d0e3212fe323fbdd10d56da5 Reviewed-on: https://chromium-review.googlesource.com/398059 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Fix a win32 build error by moving a #include out of an #ifndef _WIN32Ted Mielczarek2016-09-201-1/+2
|
* This change allows compiling the google-breakpad code using a global ↵Ivan Penkov2016-08-304-10/+13
| | | | | | | | | | | | ::string class instead of std::string. For more details take a look at common/using_std_string.h BUG= Change-Id: I11f1ce697be23e13f12ea8f0468bbe02fa63c967 Reviewed-on: https://chromium-review.googlesource.com/378159 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Updating ExploitabilityLinux to check memory mapping names against a prefixBen Scarlato2016-08-293-8/+15
| | | | | | | | | | | instead of a specific name. This will prevent false positives on systems which use a format such as “[stack:69616]” for stack memory mapping names. Change-Id: I51aeda2fe856c1f37f0d18ac06cce69fec2fffa2 Reviewed-on: https://chromium-review.googlesource.com/377086 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Update MDRawMiscInfo to support version 5 of the MINIDUMP_MISC_INFO_N structure.Gabriele Svelto2016-08-191-7/+80
| | | | | | | | The routines used to read from the structure were also modified to accomodate for unknown future versions by skipping over the unsupported part instead of failing. R=ted.mielczarek@gmail.com Review URL: https://codereview.chromium.org/2109063004/ .
* Add new exception code for OOM generated from Chromium.Will Harris2016-07-191-0/+3
| | | | | | | | | See also https://codereview.chromium.org/2130293003/ for Chromium-side change and go/internal_cl_for_2130293003 for internal change. BUG=chromium:614440 R=mark@chromium.org Review URL: https://codereview.chromium.org/2160373002 .
* Server-side workaround to handle overlapping modules.Ivan Penkov2016-06-2012-36/+158
| | | | | | | | | | | | | | This change is resolving an issue that was caused by the combination of: - Android system libraries being relro packed in N+. - Breakpad dealing with relro packed libraries in a hack way. This is a fix for http://crbug/611824. I also found an use-after-free issue (bug in Minidump::SeekToStreamType). I disallowed the MinidumpStreamInfo copy and assign constructors and the compiler detected another similar issue in Minidump::Print. Then I disabled the copy and assign constructors for most classes in minidump.h (just in case). There are a couple of classes where I couldn't disallow them (since assign is used). This will require a small refactor so I left it out of this CL. R=mark@chromium.org Review URL: https://codereview.chromium.org/2060663002 .
* Fix a trivial parsing bug caught by static analysisNicholas Nethercote2016-06-101-1/+1
| | | | R=ted
* Update symbol file documentation links.Ralph Giles2016-06-102-2/+2
| | | | | | | These locations have changed since the move from Google Code. R=ted.mielczarek@gmail.com BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1275630
* Adding support for overlapping ranges to RangeMap.Ivan Penkov2016-06-0510-89/+531
| | | | | | | | | | When enabled, adding of a new range that overlaps with an existing one can be a successful operation. The range which ends at the higher address will be shrunk down by moving its start position to a higher address so that it does not overlap anymore. This change is required to fix http://crbug/611824. The actual fix will come in a separate CL. R=mmandlis@chromium.org Review URL: https://codereview.chromium.org/2029953003 .
* fix signed warning errors in unittestsMike Frysinger2016-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | A bunch of gtest assert statements fail due to signed warnings as unadorned constants are treated as signed integers. Mark them all unsigned to avoid that. One example (focus on the "[with ...]" blocks that show the types): In file included from src/breakpad_googletest_includes.h:33:0, from src/common/memory_unittest.cc:30: src/testing/gtest/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]': src/testing/gtest/include/gtest/gtest.h:1524:23: required from 'static testing::AssertionResult testing::internal::EqHelper<true>::Compare(const char*, const char*, const T1&, const T2&, typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type*) [with T1 = int; T2 = long unsigned int; typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type = void]' src/common/memory_unittest.cc:41:246: required from here src/testing/gtest/include/gtest/gtest.h:1448:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (expected == actual) { ^ cc1plus: some warnings being treated as errors Makefile:5180: recipe for target 'src/common/src_client_linux_linux_client_unittest_shlib-memory_unittest.o' failed make[2]: *** [src/common/src_client_linux_linux_client_unittest_shlib-memory_unittest.o] Error 1 R=ted.mielczarek@gmail.com Review URL: https://codereview.chromium.org/2013893003 .
* [MIPS] Rename variable mips to mips32Veljko Mihailovic2016-05-251-5/+5
| | | | | | | | | | | | Renaming variable mips to mips32 since mips is already defined by the toolchain. BUG=Compile error in Chromium R=mark@chromium.org Review URL: https://codereview.chromium.org/2006393004 . Patch from Veljko Mihailovic <veljko.mihailovic@imgtec.com>.
* Revert "Write adjusted range back to module"Tao Bai2016-05-131-8/+0
| | | | | | | | | | | | | This is no right fix, we shouldn't allow module overlap. This reverts commit 4f417c8c0ffceb6c2516c6ef00cd91ca5746d852. BUG=606972 R=mark@chromium.org Review URL: https://codereview.chromium.org/1976683004 . Patch from Tao Bai <michaelbai@chromium.org>.
* Write adjusted range back to moduleTao Bai2016-05-031-0/+8
| | | | | | | | | | | | | | | | | In Android, the mmap could be overlapped by /dev/ashmem, we adjusted the range in https://breakpad.appspot.com/9744002/, but adjusted range isn't written back to module, this caused the corresponding module be dropped in BasicCodeModules copy constructor. This also fix a lot of 'unable to store module' warnings when dumping Android's minidump. BUG=606972 R=mark@chromium.org, wfh@chromium.org Review URL: https://codereview.chromium.org/1939333002 . Patch from Tao Bai <michaelbai@chromium.org>.
* Make x86-64 frame pointer unwinding stricterTed Mielczarek2016-04-192-51/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The x86-64 frame pointer-based unwind method will accept values that aren't valid for the frame pointer register and the return address. This fixes it to reject non-8-byte-aligned frame pointers, as well as non-canonical addresses for the return address it finds. A colleague of mine asked me why Breakpad gave a bad stack for a crash in our crash-stats system: https://crash-stats.mozilla.com/report/index/a472c842-2c7b-4ca7-a267-478cf2160405 Digging in, it turns out that the function in frame 0 is a leaf function, so MSVC doesn't generate an entry in the unwind table for it, so dump_syms doesn't produce a STACK CFI entry for it in the symbol file. The stackwalker tries frame pointer unwinding, and %rbp is set to a value that sort-of works, so it produces a garbage frame 1 and then is lost. Either of the two checks in this patch would have stopped the stackwalker from using the frame pointer. It's possible we could do something smarter on the dump_syms side, like enumerating all functions and outputing some default STACK CFI rule for those that don't have unwind info, but that wouldn't fix crashes from existing builds without re-dumping symbols for them. In any event, these checks should always pass for valid frame pointer-using functions. R=mark@chromium.org BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1263001 Review URL: https://codereview.chromium.org/1902783002 .
* Bump MinidumpMemoryRegion::max_bytes to 2MBTed Mielczarek2016-04-141-1/+1
| | | | | | | BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=694 R=mark@chromium.org Review URL: https://codereview.chromium.org/1883253002 .
* Add some new stream types to MDStreamTypeTed Mielczarek2016-04-131-0/+8
| | | | | | | | | | | | | | I ran minidump_dump on a dump from Firefox on my Windows 10 machine and noticed some streams that Breakpad didn't have names for. Looking in minidumpapiset.h in the Windows 10 SDK finds these values in MINIDUMP_STREAM_TYPE. There are also struct definitions for the stream data for some of them (all but JavaScriptData), but I don't have a particular need for those currently. R=mark@chromium.org BUG= Review URL: https://codereview.chromium.org/1884943002 .