[compiler-rt] [llvm] scudo: Support free_sized and free_aligned_sized from C23 (PR #146556)
Justin King via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 09:34:30 PDT 2025
================
@@ -49,3 +49,18 @@ SCUDO_FLAG(int, release_to_os_interval_ms, 5000,
SCUDO_FLAG(int, allocation_ring_buffer_size, 32768,
"Entries to keep in the allocation ring buffer for scudo. "
"Values less or equal to zero disable the buffer.")
+
+SCUDO_FLAG(bool, delete_alignment_mismatch, true,
+ "Terminate on an alignment mismatch between a aligned-delete and "
+ "the actual "
+ "alignment of a chunk (as provided to new/new[]).")
+
+SCUDO_FLAG(bool, free_size_mismatch, true,
+ "Terminate on a size mismatch between a free_sized and the actual "
+ "size of a chunk (as provided to malloc/calloc/realloc).")
+
+SCUDO_FLAG(bool, free_alignment_mismatch, true,
+ "Terminate on an alignment mismatch between a free_aligned_sized "
+ "and the actual "
+ "alignment of a chunk (as provided to "
+ "aligned_alloc/posix_memalign/memalign).")
----------------
jcking wrote:
No reason other than for allowing integrators to disable one or the other if there is a bad existing library. Typically `delete` and `free` are separate, so I didn't want to bundle them up in the same flag.
https://github.com/llvm/llvm-project/pull/146556
More information about the llvm-commits
mailing list