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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 01:05:20 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:

For the other places where `isInterestingAlloca` is called, does the address sanitizer support those cases with scalable vectors? If not, it's probably safer to disable this entirely and add a TODO to make the address sanitizer to support scalable vectors in general.

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


More information about the llvm-commits mailing list