[compiler-rt] [scudo] Fix stack depot validation. (PR #87024)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 17:38:26 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;
----------------
ChiaHungDuan wrote:
I'm wondering if we should fix `isPowerOfTwo` instead? Zero is not a power of 2.
https://github.com/llvm/llvm-project/pull/87024
More information about the llvm-commits
mailing list