[compiler-rt] [scudo] Add config option to modify get usable size behavior (PR #158710)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 15:48:55 PDT 2025
================
@@ -57,6 +57,10 @@ BASE_OPTIONAL(const bool, MaySupportMemoryTagging, false)
// Disable the quarantine code.
BASE_OPTIONAL(const bool, QuarantineDisabled, false)
+// If set to true, malloc_usable_size returns the exact size of the allocation.
+// If set to false, return the total available size in the allocation.
+BASE_OPTIONAL(const bool, ExactUsableSize, true)
----------------
ChiaHungDuan wrote:
Yes, I was thinking how useful this being flag is. For people don't use usable-size, either size is fine to them and it doesn't give direct security benefit. So reporting block size by default seems to avoid the flags that will be barely used (or hard to understand when to use)
No strong opinion here. Will leave you to make the decision
https://github.com/llvm/llvm-project/pull/158710
More information about the llvm-commits
mailing list