Merge "Update to FreeBSD libm r336665."
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/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",
diff --git a/tests/Android.mk b/tests/Android.mk
index c945bab..fc7b940 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -68,25 +68,6 @@
$(LOCAL_PATH)/file-check-cxx \
| $(HOST_OUT_EXECUTABLES)/FileCheck$(HOST_EXECUTABLE_SUFFIX) \
-LOCAL_CXX = $(LOCAL_PATH)/file-check-cxx \
- $(HOST_OUT_EXECUTABLES)/FileCheck \
- $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CXX) \
- GCC \
-
-LOCAL_CLANG := false
-LOCAL_MODULE := bionic-compile-time-tests-g++
-LOCAL_CPPFLAGS := -Wall -Werror
-# Disable color diagnostics so the warnings output matches the source
-LOCAL_CPPFLAGS += -fdiagnostics-color=never
-LOCAL_SRC_FILES := fortify_filecheck_diagnostics_test.cpp
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := \
- $(LOCAL_PATH)/Android.mk \
- $(LOCAL_PATH)/file-check-cxx \
- | $(HOST_OUT_EXECUTABLES)/FileCheck$(HOST_EXECUTABLE_SUFFIX) \
-
LOCAL_CXX := $(LOCAL_PATH)/file-check-cxx \
$(HOST_OUT_EXECUTABLES)/FileCheck \
$(LLVM_PREBUILTS_PATH)/clang++ \