[all-commits] [llvm/llvm-project] 537f3d: [SafeStack] Fix crashing with scalable TypeSizes (...

Jakob Koschel via All-commits all-commits at lists.llvm.org
Wed Mar 4 16:12:06 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 537f3d3a7588d226b86590f97c4401107585e1ce
      https://github.com/llvm/llvm-project/commit/537f3d3a7588d226b86590f97c4401107585e1ce
  Author: Jakob Koschel <jakobkoschel at google.com>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M llvm/lib/CodeGen/SafeStack.cpp
    A llvm/test/CodeGen/AArch64/safestack_scalar.ll

  Log Message:
  -----------
  [SafeStack] Fix crashing with scalable TypeSizes (#180547)

On e.g. aarch64 the TypeSize of scalar types can have a size that is not
known at compile time.
Currently when safestack occurs those it simply crashes as described in
https://github.com/llvm/llvm-project/issues/175868.

Since we cannot verify the size at compile time we simply consider the
access to be unsafe (in regards to safestack).

Reproducer:
```
#include <arm_sve.h>

int main() {
    svint32_t vec = svindex_s32(0, 1);
    svint32_t res = svadd_s32_z(svptrue_b32(), vec, vec);
    int32_t buffer[1024];
    svst1_s32(svptrue_b32(), buffer, res);
    return 0;
}
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list