[compiler-rt] [msan] Mark allocator padding as uninitialized, with new origin tag (PR #157187)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 15:46:46 PDT 2025


================
@@ -22,6 +22,7 @@ MSAN_FLAG(int, origin_history_size, Origin::kMaxDepth, "")
 MSAN_FLAG(int, origin_history_per_stack_limit, 20000, "")
 MSAN_FLAG(bool, poison_heap_with_zeroes, false, "")
 MSAN_FLAG(bool, poison_stack_with_zeroes, false, "")
+MSAN_FLAG(bool, poison_in_calloc, true, "")
----------------
fmayer wrote:

That's what the flag does though; it doesn't matter what it is called. If we started adding separate flags for all the other operations, and didn't respect the `poison_in_malloc` flag for them anymore, that would break people.

Leaving to @vitalybuka to tie-break here. If we are doing this, call it something else. `poison_in_malloc` + `poison_in_calloc` implies there are `poison_in_X`, which there aren't; and there probably never will be.

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


More information about the llvm-commits mailing list