aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker_mips.cc
Commit message (Collapse)AuthorAgeFilesLines
* Handle very large stack tracesLeonard Mosescu2017-07-121-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [MIPS]: Don't terminate stackwalk when $sp value doesn't change between framesDragan Mladjenovic2017-03-161-1/+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 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>
* Revert "Several fixes for broken Mac build"Roman Margold2017-02-011-3/+3
| | | | This reverts commit 5c521532fc0a1b65f42c0d61d2da206eadf318b8.
* Several fixes for broken Mac buildRoman Margold2017-02-011-3/+3
|
* [mips64] Support for mips n64Mike Frysinger2016-02-061-126/+274
| | | | | | | | | | Adding remaining mips n64 support including stackwalker. BUG=None TEST=manually tested on Linux/Android R=vapier@chromium.org Review URL: https://codereview.chromium.org/1418453011 .
* This patch adds required change for stackwalker_mips_unittest to pass on 64bitgordana.cmiljanovic@imgtec.com2013-09-301-1/+1
| | | | | | | | | | | | | | | | | platforms. One test from stackwalker_mips_unittest was failing as mentioned in: https://breakpad.appspot.com/632002/ https://breakpad.appspot.com/633002/ BUG=none TEST=stackwalker_mips_unittest (run on x86-64 and mips) Review URL: https://breakpad.appspot.com/634002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1218 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix for a clang error which is introduced by change r1212.gordana.cmiljanovic@imgtec.com2013-09-131-2/+2
| | | | | | | | | | | BUG=none TEST=build Review URL: https://breakpad.appspot.com/630002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1213 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding support for mips.gordana.cmiljanovic@imgtec.com2013-09-111-0/+300
Support for mips cpu is added to all breakapad targets including unittests. BUG=none TEST=unittests Review URL: https://breakpad.appspot.com/614002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e