summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-03-28 15:12:49 -0700
committerChristopher Ferris <cferris@google.com>2018-03-28 20:52:52 -0700
commitfd6b7284ee4154bdab11da7d332920dc8b6aa342 (patch)
tree4871b2da07dbc4ba5f525251aafb13e4b7e392d3 /base/errors_unix.cpp
parentfce960cdf491d0de6101d76292eacab2c45b29df (diff)
Fix null pointer dereference in RegsArm.
Fix RegsArm::GetPcAdjustment to check for an invalid elf before trying to read memory. Modify the tests for this so it crashes without this change. Also modify the GetPcAdjustment for all different architectures so that unless the relative pc is too small, it will return the minimum amount that should be adjusted. This is to handle cases where we still want to adjust the pc but it's in an invalid elf. Mostly this is for handling cases when the pc is in jit gdb debug code so that we use the right unwind information. Bug: 77233204 Test: Passes unit tests for libbacktrace/libunwindstack. Change-Id: Id73609adaf3b80a583584441de228156fec3afa7 (cherry picked from commit 6dbc28ece3ab7cadd0087b4dc31ba9a2986545f0)
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions