Commit Graph

6 Commits (2024110700)

Author SHA1 Message Date
Dmitry Muhomor 365ee6900d android: restore the default SIGABRT handler in fatal_error()
async_safe_fatal() calls abort() at the end, which can be intercepted by a custom SIGABRT handler.

In particular, crashlytics installs such a handler and tries to fork() after catching SIGABRT.

hardened_malloc uses pthread_atfork() to register fork handlers. These handlers try to lock internal
hardened_malloc mutexes. If at least one of those mutexes is already locked, which is usually the
case, thread that called fatai_error() gets deadlocked, while the other threads (if there are any)
continue to run.
2023-12-31 11:21:28 -05:00
Dmitry Muhomor 8d5c631224 android: implement fatal_error() via async_safe_fatal()
async_safe_fatal() performs the following steps:
- logs the error message to stderr and logcat
- passes error message to debuggerd via android_set_abort_message(). debuggerd then saves the error
message in the crash report file ("tombstone")
- calls abort()
2023-09-28 13:47:11 -04:00
Daniel Micay 8d0314295e support Android's logging system for fatal_error 2020-10-19 07:51:00 -04:00
Daniel Micay 1fbf0e27f5 make error reporting more robust 2018-10-03 16:58:49 -04:00
Daniel Micay 6dfe33b4f1 add prefix to reported errors 2018-10-03 16:22:28 -04:00
Daniel Micay 70d61b6662 initial commit 2018-08-23 15:42:41 -04:00