[compiler-rt] [scudo] Add primary option to zero block on dealloc. (PR #142394)

Fabio D'Urso via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 12:48:25 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,
----------------
fabio-d wrote:

Having it as a flag makes it possible to selectively opt-in only some programs, rather than anything linked against the same libc (on Fuchsia, Scudo is embedded in the libc binary).

This way, we can enable this new behavior only for select programs that we know have a wake+short_work+long_sleep typical cycle.

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


More information about the llvm-commits mailing list