commit | 13fd28efe1507c475ae94c32969e66732f212dfe | [log] [tgz] |
---|---|---|
author | Joshua Peraza <jperaza@chromium.org> | Wed Dec 02 15:45:31 2020 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jan 19 07:18:33 2021 -0800 |
tree | b26c4e078b62aac3bed28b5579bc74a4815ad7b0 | |
parent | a57c0fc71aad11ce8300548bde45fc9c2117f5f6 [diff] |
linux: Correct handling of load bias The load bias is documented to be the difference between the preferred and actual load address for a module, but is declared as an unsigned number, and math using it relies on it being a pointer-precisioned two's complement number that might cause over- or under-flow. ElfImageReader and DebugRendezvous both provide ways to get the load bias for a module and are corroborated in tests. However, the load bias computed by DebugRendezvous does not have access to the preferred address, so there is not enough information to determine the signedness to use with a VMOffset. This patch compares the load biases modulo the numeric range for a pointer to ignore the signedness of the value. Also update the test module to trigger a negative load bias. Bug: chromium:1147922 Change-Id: Ic8123ad3a223166411adff4049db5ffc5118453c Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2569886 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> GitOrigin-RevId: 00491d58ee2957845431ef70c88349d19fbb3f17
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.