SIGN IN SIGN UP

fix(anr): Detect main thread from tombstone via pid matching thread id (#5742)

* fix(anr): Detect main thread from tombstone via pid matching thread id

On Linux/Android the main thread's kernel thread id always equals the process
id, so match a tombstone thread whose id equals the pid as the main thread and
normalize its name back to "main". This is more robust than relying on the
OS-assigned thread name, which some versions/OEMs replace with the process name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* changelog

* Clarify main thread detection comments

* Fix typo in main thread detection comment

* Remove redundant comments in tombstone parser test

* Fix failing tests

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
M
Markus Hintersteiner committed
d99fe3360932e9cb92c32a4e23653240eceb8a96
Parent: d12e9b5
Committed by GitHub <noreply@github.com> on 7/9/2026, 7:28:59 AM