platform_system_core/debuggerd/handler
Tomislav Novak 24a7df5d38 debuggerd: fix passing of fdsan_table to crash_dump
Commit aosp/1259140 moved fdsan_table into debugger_process_info, which
is populated conditionally. This introduced a bug where the process that
receives BIONIC_SIGNAL_DEBUGGER (35) does not propagate the fdsan_table
pointer to crash_dump:

  $ adb shell kill -SIG35 <pid>
  $ adb logcat -s DEBUG
  E DEBUG   : failed to read fdsan table entry 0: I/O error

Fdsan in warn-only mode uses BIONIC_SIGNAL_DEBUGGER[1], so the generated
tombstones don't have any fd ownership info.

Fix it by calling get_process_info() irrespective of the signal being
handled, taking care to preserve the previous behavior of not showing
abort messages set by applications in non-fatal dumps.

Test: debuggerd_test
Test: send SIG35 to arbitrary process and inspect the log and tombstone
Test: crasher fdsan_file

[1] 20ad9129e7/libc/bionic/fdsan.cpp (166)

Change-Id: I76931ca4825e846fc99f26fa590c045130abb850
2023-08-09 15:19:51 -07:00
..
debuggerd_fallback.cpp Fix fallback paths for dumping threads. 2022-05-27 13:05:56 -07:00
debuggerd_fallback_nop.cpp debuggerd: unify licenses. 2021-06-18 15:49:30 -07:00
debuggerd_handler.cpp debuggerd: fix passing of fdsan_table to crash_dump 2023-08-09 15:19:51 -07:00
fallback.h Fix multithreaded backtraces for seccomp processes. 2018-09-12 18:12:13 -07:00