[PATCH] D55064: Add new `__sanitizer_mz_default_zone()` API which returns the address of the ASan malloc zone. This API will be used for testing in future patches.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 04:42:06 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL348481: Add new `__sanitizer_mz_default_zone()` API which returns the address of theā€¦ (authored by delcypher, committed by ).

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55064/new/

https://reviews.llvm.org/D55064

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_malloc_mac.inc


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_malloc_mac.inc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_malloc_mac.inc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_malloc_mac.inc
@@ -265,6 +265,13 @@
   return p;
 }
 
+// This public API exists purely for testing purposes.
+extern "C"
+SANITIZER_INTERFACE_ATTRIBUTE
+malloc_zone_t* __sanitizer_mz_default_zone() {
+  return &sanitizer_zone;
+}
+
 // This function is currently unused, and we build with -Werror.
 #if 0
 void __sanitizer_mz_free_definite_size(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55064.176952.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181206/ca422926/attachment.bin>


More information about the llvm-commits mailing list