[libc-commits] [PATCH] D122362: [libc][obvious] add aligned_alloc as entrypoint

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 23 16:37:54 PDT 2022


michaelrj created this revision.
michaelrj added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett, cryptoad, mgorny.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.

This patch adds aligned_alloc as an entrypoint. Previously it was being
included implicitly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122362

Files:
  libc/config/linux/x86_64/entrypoints.txt
  libc/spec/stdc.td
  libc/src/stdlib/CMakeLists.txt
  libc/test/integration/scudo/CMakeLists.txt


Index: libc/test/integration/scudo/CMakeLists.txt
===================================================================
--- libc/test/integration/scudo/CMakeLists.txt
+++ libc/test/integration/scudo/CMakeLists.txt
@@ -15,6 +15,7 @@
     libc.src.stdlib.malloc
     libc.src.stdlib.calloc
     libc.src.stdlib.realloc
+    libc.src.stdlib.aligned_alloc
     libc.src.stdlib.free
 )
 
Index: libc/src/stdlib/CMakeLists.txt
===================================================================
--- libc/src/stdlib/CMakeLists.txt
+++ libc/src/stdlib/CMakeLists.txt
@@ -234,6 +234,11 @@
     DEPENDS
       ${SCUDO_DEPS}
   )
+  add_entrypoint_external(
+    aligned_alloc
+    DEPENDS
+      ${SCUDO_DEPS}
+  )
   add_entrypoint_external(
     free
     DEPENDS
@@ -249,6 +254,9 @@
   add_entrypoint_external(
     realloc
   )
+  add_entrypoint_external(
+    aligned_alloc
+  )
   add_entrypoint_external(
     free
   )
Index: libc/spec/stdc.td
===================================================================
--- libc/spec/stdc.td
+++ libc/spec/stdc.td
@@ -536,6 +536,7 @@
           FunctionSpec<"malloc", RetValSpec<VoidPtr>, [ArgSpec<SizeTType>]>,
           FunctionSpec<"calloc", RetValSpec<VoidPtr>, [ArgSpec<SizeTType>, ArgSpec<SizeTType>]>,
           FunctionSpec<"realloc", RetValSpec<VoidPtr>, [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]>,
+          FunctionSpec<"aligned_alloc", RetValSpec<VoidPtr>, [ArgSpec<SizeTType>, ArgSpec<SizeTType>]>,
           FunctionSpec<"free", RetValSpec<VoidType>, [ArgSpec<VoidPtr>]>,
 
           FunctionSpec<"_Exit", RetValSpec<NoReturn>, [ArgSpec<IntType>]>,
Index: libc/config/linux/x86_64/entrypoints.txt
===================================================================
--- libc/config/linux/x86_64/entrypoints.txt
+++ libc/config/linux/x86_64/entrypoints.txt
@@ -86,6 +86,7 @@
     libc.src.stdlib.malloc
     libc.src.stdlib.calloc
     libc.src.stdlib.realloc
+    libc.src.stdlib.aligned_alloc
     libc.src.stdlib.free
 
     # sys/mman.h entrypoints


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122362.417783.patch
Type: text/x-patch
Size: 2005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220323/96a1b39f/attachment-0001.bin>


More information about the libc-commits mailing list