Merge "Nullability check for dlfcn module"
diff --git a/libc/include/ifaddrs.h b/libc/include/ifaddrs.h
index 9eaabbd..7c0dcbf 100644
--- a/libc/include/ifaddrs.h
+++ b/libc/include/ifaddrs.h
@@ -44,26 +44,26 @@
  */
 struct ifaddrs {
   /** Pointer to the next element in the linked list. */
-  struct ifaddrs* ifa_next;
+  struct ifaddrs* _Nullable ifa_next;
 
   /** Interface name. */
-  char* ifa_name;
+  char* _Nullable ifa_name;
   /** Interface flags (like `SIOCGIFFLAGS`). */
   unsigned int ifa_flags;
   /** Interface address. */
-  struct sockaddr* ifa_addr;
+  struct sockaddr* _Nullable ifa_addr;
   /** Interface netmask. */
-  struct sockaddr* ifa_netmask;
+  struct sockaddr* _Nullable ifa_netmask;
 
   union {
     /** Interface broadcast address (if IFF_BROADCAST is set). */
-    struct sockaddr* ifu_broadaddr;
+    struct sockaddr* _Nullable ifu_broadaddr;
     /** Interface destination address (if IFF_POINTOPOINT is set). */
-    struct sockaddr* ifu_dstaddr;
+    struct sockaddr* _Nullable ifu_dstaddr;
   } ifa_ifu;
 
   /** Unused. */
-  void* ifa_data;
+  void* _Nullable ifa_data;
 };
 
 /** Synonym for `ifa_ifu.ifu_broadaddr` in `struct ifaddrs`. */
@@ -80,7 +80,7 @@
  *
  * Available since API level 24.
  */
-int getifaddrs(struct ifaddrs** __list_ptr) __INTRODUCED_IN(24);
+int getifaddrs(struct ifaddrs* _Nullable * _Nonnull __list_ptr) __INTRODUCED_IN(24);
 
 /**
  * [freeifaddrs(3)](http://man7.org/linux/man-pages/man3/freeifaddrs.3.html) frees a linked list
@@ -88,6 +88,6 @@
  *
  * Available since API level 24.
  */
-void freeifaddrs(struct ifaddrs* __ptr) __INTRODUCED_IN(24);
+void freeifaddrs(struct ifaddrs* _Nullable __ptr) __INTRODUCED_IN(24);
 
 __END_DECLS
diff --git a/tests/elftls_dl_test.cpp b/tests/elftls_dl_test.cpp
index 82ccf82..56736e7 100644
--- a/tests/elftls_dl_test.cpp
+++ b/tests/elftls_dl_test.cpp
@@ -30,6 +30,7 @@
 #include <link.h>
 
 #include <android-base/file.h>
+#include <android-base/test_utils.h>
 #include <gtest/gtest.h>
 
 #include <thread>
@@ -153,6 +154,7 @@
 }
 
 TEST(elftls_dl, dtv_resize) {
+  SKIP_WITH_HWASAN; // TODO(b/271243811): Fix for new toolchain
 #if defined(__BIONIC__)
 #define LOAD_LIB(soname) ({                           \
     auto lib = dlopen(soname, RTLD_LOCAL | RTLD_NOW); \