Generalize abort's inline_tgkill, use it in fdsan.
Convert abort's inline_tgkill to do the equivalent of
pthread_sigqueue(pthread_self(), ...), so that we can use it in fdsan
as well.
Test: bionic-unit-tests
Test: debuggerd_test32
Test: debuggerd_test64
Change-Id: I92a7b84e2f00ce021b4043ed8a3bd8683d77fe9c
diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp
index b5e141a..31ffa96 100644
--- a/libc/bionic/fdsan.cpp
+++ b/libc/bionic/fdsan.cpp
@@ -43,6 +43,7 @@
#include <sys/system_properties.h>
#include "private/bionic_globals.h"
+#include "private/bionic_inline_raise.h"
#include "pthread_internal.h"
extern "C" int ___close(int fd);
@@ -200,12 +201,11 @@
__BIONIC_FALLTHROUGH;
case ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS:
// DEBUGGER_SIGNAL
- sigval abort_msg;
- abort_msg.sival_ptr = &abort_message;
- pthread_sigqueue(pthread_self(), __SIGRTMIN + 3, abort_msg);
+ inline_raise(__SIGRTMIN + 3, &abort_message);
break;
case ANDROID_FDSAN_ERROR_LEVEL_FATAL:
+ inline_raise(SIGABRT);
abort();
case ANDROID_FDSAN_ERROR_LEVEL_DISABLED: