fuchsia: Don't capture incorrect/unreasonably large stacks

In a stack overflow test from the Fuchsia tree, an intentional crash was
being induced that at the point it was reported to Crashpad resulted in
a stack pointer outside of the stack. This caused two problems:

- Crashpad attempted to capture that whole "thing" which could have been
  anything, and in the failing test was a 1G guard region
- The whole wrong thing could be very large, resulting in OOM when
  trying to write the minidump, which was the symptom of the bug.

Don't attempt to continue of SP isn't at least in a mapping, and don't
capture too-large regions for the stack as nothing useful can come of
that anyway.

New test added: ProcessSnapshotFuchsiaTest.InvalidStackPointer.

Bug: fuchsia:41212
Change-Id: Ifb48fd8b4b5b2f0cf10ab97e01dbd8b842368775
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1912942
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Francois Rousseau <frousseau@google.com>
2 files changed
tree: fda29f557334cc693da8a9ee618cdfd17eed1c61
  1. .clang-format
  2. .gitignore
  3. .gn
  4. .vpython
  6. BUILD.gn
  8. DEPS
  10. README.md
  11. build/
  12. client/
  13. codereview.settings
  14. compat/
  15. crashpad.gyp
  16. doc/
  17. handler/
  18. infra/
  19. minidump/
  20. navbar.md
  21. package.h
  22. snapshot/
  23. test/
  24. third_party/
  25. tools/
  26. util/


Crashpad is a crash-reporting system.


Source Code

Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.

Other Links