[compiler-rt] [scudo] Add primary option to zero block on dealloc. (PR #142394)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 07:33:08 PDT 2025
================
@@ -34,6 +34,10 @@ SCUDO_FLAG(bool, delete_size_mismatch, true,
SCUDO_FLAG(bool, zero_contents, false, "Zero chunk contents on allocation.")
+SCUDO_FLAG(bool, zero_on_dealloc, false,
----------------
piwicode wrote:
Yes. I took the time to confirm that we need this to disable the feature on devices where the cpu/memory tradeoff is different. This will be used on day 1.
I turned the flag into a limit according to previous suggestion, and added a compiletime parameter `EnableZeroOnDealloc` so that the code can be stripped out by the compiler.
https://github.com/llvm/llvm-project/pull/142394
More information about the llvm-commits
mailing list