summaryrefslogtreecommitdiff
path: root/libnativebridge/tests/NativeBridge3LoadLibraryExt_test.cpp
diff options
context:
space:
mode:
author Evgenii Stepanov <eugenis@google.com> 2021-10-13 11:08:22 -0700
committer Evgenii Stepanov <eugenis@google.com> 2021-10-18 13:39:19 -0700
commit0385d89b75e01c03376f96b0138b34834d7e46d8 (patch)
tree2abc062781c5fd8653ad70ac7a46eacc2951f52d /libnativebridge/tests/NativeBridge3LoadLibraryExt_test.cpp
parent251dc7d5c33469f8510318fb564f0b9ee875e2d4 (diff)
Ignore PC/SP contents in SEGV_MTEAERR faults.
SEGV_MTEAERR (Async MTE fault) is delivered at an arbitrary point after the actual fault. Register contents, including PC and SP, are unrelated to the fault and can only confuse ART signal handlers. To be more precise, SEGV_MTEAERR is delivered at the nearest kernel entry after the invalid memory access. It is normally a system call, but can also be a random process scheduling event. I could not reproduce the problem locally, but it is apparently possible to crash with "Check failed: found_virtual Didn't find oat method index for virtual method:" if the garbage PC value passes all the sanity checks in FaultManager::HandleFault, with a stack trace like this: art::FindOatMethodFor art::ArtMethod::GetOatQuickMethodHeader art::FaultManager::IsInGeneratedCode art::FaultManager::HandleFault Bug: 201492782 Test: none Merged-In: I028067f1350574ea002f3e98a94babe2b10c2559 Change-Id: I028067f1350574ea002f3e98a94babe2b10c2559 (cherry picked from commit 0651ccc57b9aa178304546f8913cb66ceafd55bb)
Diffstat (limited to 'libnativebridge/tests/NativeBridge3LoadLibraryExt_test.cpp')
0 files changed, 0 insertions, 0 deletions