[compiler-rt] [msan] Detect dereferencing zero-alloc as use-of-uninitialized-value (PR #155944)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 19:01:57 PDT 2025
================
@@ -230,6 +230,12 @@ static void *MsanAllocate(BufferedStackTrace *stack, uptr size, uptr alignment,
__msan_set_origin(allocated, size, o.raw_id());
}
}
+
+ uptr actually_allocated_size = allocator.GetActuallyAllocatedSize(allocated);
----------------
vitalybuka wrote:
> It would be expensive to do the extra poisoning.
I don't think so. It's about alignment tail which likely smaller than primary allocation, which we poison anyway.
https://github.com/llvm/llvm-project/pull/155944
More information about the llvm-commits
mailing list