[llvm] [ASan] Prevent assert from scalable vectors in FunctionStackPoisoner. (PR #155357)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 00:57:05 PDT 2025


================
@@ -1219,7 +1219,8 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
 
     std::optional<TypeSize> Size = AI->getAllocationSize(AI->getDataLayout());
     // Check that size is known and can be stored in IntptrTy.
-    if (!Size || !ConstantInt::isValueValidForType(IntptrTy, *Size))
+    if (!Size || Size->isScalable() ||
----------------
sdesmalen-arm wrote:

It seems this is better handled in `isInterestingAlloca` instead, which has its documentation:
`Check if we want (and can) handle this alloca.`

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


More information about the llvm-commits mailing list