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
Change-Id: I028067f1350574ea002f3e98a94babe2b10c2559
1 file changed