[compiler-rt] Poison last word of FakeFrame (PR #133689)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 15:25:26 PDT 2025


================
@@ -231,6 +232,13 @@ static ALWAYS_INLINE uptr OnMalloc(uptr class_id, uptr size) {
     return 0;  // Out of fake stack.
   uptr ptr = reinterpret_cast<uptr>(ff);
   SetShadow(ptr, size, class_id, 0);
+
+  // Poison everything beyond user size, use kNumberOfSizeClasses to prevent
+  // SetShadow from inlining PoisonShadow
+  SetShadow(reinterpret_cast<uptr>(ptr + size),
----------------
vitalybuka wrote:

I assumed it will be done inside of SetShadow? it has all needed info.

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


More information about the llvm-commits mailing list