[PATCH] D74366: scudo: Fix Android build.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 17:06:51 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe79c3b4c2d22: scudo: Fix Android build. (authored by pcc).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74366

Files:
  compiler-rt/lib/scudo/standalone/wrappers_c.inc


Index: compiler-rt/lib/scudo/standalone/wrappers_c.inc
===================================================================
--- compiler-rt/lib/scudo/standalone/wrappers_c.inc
+++ compiler-rt/lib/scudo/standalone/wrappers_c.inc
@@ -182,8 +182,8 @@
 INTERFACE WEAK int SCUDO_PREFIX(malloc_info)(UNUSED int options, FILE *stream) {
   const scudo::uptr max_size =
       decltype(SCUDO_ALLOCATOR)::PrimaryT::SizeClassMap::MaxSize;
-  auto *sizes =
-      static_cast<scudo::uptr *>(calloc(max_size, sizeof(scudo::uptr)));
+  auto *sizes = static_cast<scudo::uptr *>(
+      SCUDO_PREFIX(calloc)(max_size, sizeof(scudo::uptr)));
   auto callback = [](uintptr_t, size_t size, void* arg) {
     auto *sizes = reinterpret_cast<scudo::uptr *>(arg);
     if (size < max_size)
@@ -196,7 +196,7 @@
     if (sizes[i])
       fprintf(stream, "<alloc size=\"%lu\" count=\"%lu\"/>\n", i, sizes[i]);
   fputs("</malloc>\n", stream);
-  free(sizes);
+  SCUDO_PREFIX(free)(sizes);
   return 0;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74366.243704.patch
Type: text/x-patch
Size: 981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/d3e0a640/attachment.bin>


More information about the llvm-commits mailing list