Merge "remove bionic-compile-time-tests-g++"
diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp
index df369cc..1ace9b6 100644
--- a/libc/bionic/fdsan.cpp
+++ b/libc/bionic/fdsan.cpp
@@ -30,6 +30,7 @@
#include <errno.h>
#include <inttypes.h>
+#include <signal.h>
#include <stdarg.h>
#include <stdatomic.h>
#include <string.h>
@@ -117,20 +118,26 @@
va_list va;
va_start(va, fmt);
- async_safe_fatal_va_list("fdsan", fmt, va);
+ if (error_level == ANDROID_FDSAN_ERROR_LEVEL_FATAL) {
+ async_safe_fatal_va_list("fdsan", fmt, va);
+ } else {
+ async_safe_format_log_va_list(ANDROID_LOG_ERROR, "fdsan", fmt, va);
+ }
va_end(va);
switch (error_level) {
case ANDROID_FDSAN_ERROR_LEVEL_WARN_ONCE:
atomic_compare_exchange_strong(&fd_table->error_level, &error_level,
ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
+ case ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS:
+ // DEBUGGER_SIGNAL
+ raise(__SIGRTMIN + 3);
break;
case ANDROID_FDSAN_ERROR_LEVEL_FATAL:
abort();
case ANDROID_FDSAN_ERROR_LEVEL_DISABLED:
- case ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS:
break;
}
}
diff --git a/libc/bionic/system_property_api.cpp b/libc/bionic/system_property_api.cpp
index 10d1bb3..051bc4c 100644
--- a/libc/bionic/system_property_api.cpp
+++ b/libc/bionic/system_property_api.cpp
@@ -48,8 +48,6 @@
return system_properties.Init(PROP_FILENAME) ? 0 : -1;
}
-// This was previously for testing, but now that SystemProperties is its own testable class,
-// there is never a reason to call this function.
__BIONIC_WEAK_FOR_NATIVE_BRIDGE
int __system_property_set_filename(const char*) {
return -1;
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 67beb9a..744a45b 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -58,8 +58,8 @@
#define PROP_ERROR_SET_FAILED 0x0024
/*
-** Map the property area from the specified filename. This
-** method is for testing only.
+** This was previously for testing, but now that SystemProperties is its own testable class,
+** there is never a reason to call this function and its implementation simply returns -1.
*/
int __system_property_set_filename(const char* __filename);
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 201f40a..1607c62 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -94,7 +94,8 @@
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos /* full-blown ANSI C */
-#define __CONCAT(x,y) x ## y
+#define __CONCAT1(x,y) x ## y
+#define __CONCAT(x,y) __CONCAT1(x,y)
#define __STRING(x) #x
#if defined(__cplusplus)
diff --git a/libc/seccomp/Android.bp b/libc/seccomp/Android.bp
index ae99857..232024f 100644
--- a/libc/seccomp/Android.bp
+++ b/libc/seccomp/Android.bp
@@ -1,5 +1,6 @@
cc_library {
name: "libseccomp_policy",
+ recovery_available: true,
srcs: [
"seccomp_policy.cpp",
"arm_app_policy.cpp",