Merge "Rewrite sigwait tests in the style of the sigwaitinfo tests."
diff --git a/libc/bionic/gwp_asan_wrappers.cpp b/libc/bionic/gwp_asan_wrappers.cpp
index e60a2f9..d3e6a14 100644
--- a/libc/bionic/gwp_asan_wrappers.cpp
+++ b/libc/bionic/gwp_asan_wrappers.cpp
@@ -177,8 +177,7 @@
}
static const MallocDispatch gwp_asan_dispatch __attribute__((unused)) = {
- // TODO(b/150456936) - GWP-ASan's calloc is disabled for now.
- Malloc(calloc),
+ gwp_asan_calloc,
gwp_asan_free,
Malloc(mallinfo),
gwp_asan_malloc,
diff --git a/libc/platform/bionic/macros.h b/libc/platform/bionic/macros.h
index 28a69e6..076cff1 100644
--- a/libc/platform/bionic/macros.h
+++ b/libc/platform/bionic/macros.h
@@ -83,11 +83,15 @@
#define __BIONIC_FALLTHROUGH
#endif
-template <typename T>
-static inline T* untag_address(T* p) {
+static inline uintptr_t untag_address(uintptr_t p) {
#if defined(__aarch64__)
- return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) & ((1ULL << 56) - 1));
+ return p & ((1ULL << 56) - 1);
#else
return p;
#endif
}
+
+template <typename T>
+static inline T* untag_address(T* p) {
+ return reinterpret_cast<T*>(untag_address(reinterpret_cast<uintptr_t>(p)));
+}
diff --git a/libdl/Android.bp b/libdl/Android.bp
index f431e84..8e3a3fc 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -29,11 +29,6 @@
sanitize: {
never: true,
},
-
- apex_available: [
- "//apex_available:platform",
- "com.android.runtime",
- ],
}
cc_library {
diff --git a/linker/Android.bp b/linker/Android.bp
index 3190870..4be080b 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -98,7 +98,6 @@
static_libs: [
"libziparchive",
"libbase",
- "libdl", // libbase uses dlsym
"libz",
"libasync_safe",
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 15b6a40..8eb72dc 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3450,12 +3450,15 @@
if (file_exists(kLdGeneratedConfigFilePath)) {
return kLdGeneratedConfigFilePath;
- } else {
- // TODO(b/146386369) : Adjust log level and add more condition to log only when necessary
- INFO("Warning: failed to find generated linker configuration from \"%s\"",
- kLdGeneratedConfigFilePath);
}
+ // Do not raise message from a host environment which is expected to miss generated linker
+ // configuration.
+#if defined(__ANDROID__)
+ DL_WARN("Warning: failed to find generated linker configuration from \"%s\"",
+ kLdGeneratedConfigFilePath);
+#endif
+
path = get_ld_config_file_vndk_path();
if (file_exists(path.c_str())) {
return path;
diff --git a/tests/utils.h b/tests/utils.h
index 5014ef7..5085a7a 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -25,6 +25,8 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <bionic/macros.h>
+
#include <atomic>
#include <string>
#include <regex>
@@ -66,14 +68,6 @@
#define SKIP_WITH_HWASAN if (running_with_hwasan()) GTEST_SKIP()
-static inline void* untag_address(void* addr) {
-#if defined(__LP64__)
- constexpr uintptr_t mask = (static_cast<uintptr_t>(1) << 56) - 1;
- addr = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(addr) & mask);
-#endif
- return addr;
-}
-
#if defined(__linux__)
#include <sys/sysmacros.h>