[libc-commits] [libc] [libc] Implement dual freestore rotation for baremetal heap (PR #209811)

Daniel Thornburgh via libc-commits libc-commits at lists.llvm.org
Thu Aug 27 11:47:23 PDT 2026


================
@@ -189,6 +189,12 @@
       "doc": "Trap with SIGFPE when feraiseexcept is called with unmasked floating point exceptions, similar to glibc's behavior.  This is currently working only on x86 with SSE."
     }
   },
+  "baremetal": {
+    "LIBC_COPT_BAREMETAL_HEAP_ENABLE_FREESTORE_ROTATION": {
+      "value": true,
+      "doc": "Enable rotational dual freestore in FreeListHeap to delay reuse of freed memory. This, when combined with sanitizers, helps detect Use-After-Free (UAF) bugs more reliably by preventing rapid reallocation of recently freed blocks."
----------------
mysterymath wrote:

Is there any user benefit for this change today? Or is this just the foundation for future work? That's not necessarily a blocker, but it might suggest that this should be internal mechanism rather than external until something can be hooked up end-to-end.

https://github.com/llvm/llvm-project/pull/209811


More information about the libc-commits mailing list