platform_system_core/debuggerd/libdebuggerd
Peter Collingbourne 7827991d7f Fix scudo MTE tests.
r.android.com/2108505 was intended to fix a crash in Scudo in
the case where the stack depot, region info or ring buffer were
unreadable. However, it also ended up introducing a number of bugs into
the code. It failed to call __scudo_get_error_info if the page at the
fault address was unreadable. This can happen in legitimate crash cases
if a primary allocation was close to the boundary of a mapped region,
or if the allocation was a secondary allocation with guard pages. It
also used long as the type for tags, whereas Scudo expects it to be
char. In combination this ended up causing most of the MTE tests to
fail. Therefore, mostly revert that change.

Fix the original crash by null checking the pointers returned by
AllocAndReadFully before proceeding with the rest of the function.

Bug: 233720136
Change-Id: I04d70d2abffaa35fe315d15d9224f9b412a9825d
2022-06-30 18:54:19 -07:00
..
include/libdebuggerd Fix scudo MTE tests. 2022-06-30 18:54:19 -07:00
test Fix scudo MTE tests. 2022-06-30 18:54:19 -07:00
backtrace.cpp Use the new AndroidUnwinder object. 2022-05-12 15:18:46 -07:00
gwp_asan.cpp Use the new AndroidUnwinder object. 2022-05-12 15:18:46 -07:00
open_files_list.cpp libdebuggerd: decode fdsan owner tags. 2018-08-28 13:48:08 -07:00
scudo.cpp Fix scudo MTE tests. 2022-06-30 18:54:19 -07:00
tombstone.cpp Fix fallback paths for dumping threads. 2022-05-27 13:05:56 -07:00
tombstone_proto.cpp Fix scudo MTE tests. 2022-06-30 18:54:19 -07:00
tombstone_proto_to_text.cpp debuggerd: add the PAC keys to the tombstones. 2022-01-13 15:03:19 -08:00
utility.cpp Use the new AndroidUnwinder object. 2022-05-12 15:18:46 -07:00