[compiler-rt] [scudo] Fix stack depot validation. (PR #87024)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 17:40:34 PDT 2024


================
@@ -112,7 +112,7 @@ class alignas(atomic_u64) StackDepot {
     if (TabMask == 0)
       return false;
     uptr TabSize = TabMask + 1;
-    if (!isPowerOfTwo(TabSize))
+    if (TabSize == 0 || !isPowerOfTwo(TabSize))
       return false;
----------------
cferris1000 wrote:

It might be worth doing that, but I do worry that somewhere, something depends on the behavior.

I'll file a bug because I think that's a bigger change and requires some extra verification.

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


More information about the llvm-commits mailing list