Skip to content

Conversation

@thurstond
Copy link
Contributor

target("aarch64.svcount") is not properly supported by MSan, and will lead to a crash:

fatal error: error in backend: Cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`

This commit adds two test cases: a full test case for tracking any future improvements to the instrumentation (and also showing the crash), and a manually reduced test case to show the crash.

Forked from llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll

target("aarch64.svcount") is not properly supported by MSan, and will lead to a clang crash:
```
fatal error: error in backend: Cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`
```

This commit adds two test cases: a full test case for tracking any future improvements to the instrumentation, and a manually reduced test case to show the crash.

Forked from llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll
@thurstond thurstond merged commit ca4df68 into llvm:main Oct 20, 2025
11 checks passed
thurstond added a commit to thurstond/llvm-project that referenced this pull request Oct 20, 2025
This shows a crash that happens because MSan tries to check the shadow
of target("aarch64.svcount").

This is the followup to
llvm#164315. This also does a
drive-by fix of those test cases, to use 'not opt' instead of XFAIL.

Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
thurstond added a commit to thurstond/llvm-project that referenced this pull request Oct 21, 2025
This shows a crash that happens because MSan tries to check the shadow
of target("aarch64.svcount").

This is the followup to
llvm#164315. This also does a
drive-by fix of those test cases, to use 'not opt' instead of XFAIL.

Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
thurstond added a commit to thurstond/llvm-project that referenced this pull request Oct 21, 2025
This shows a crash that happens because MSan tries to check the shadow
of target("aarch64.svcount").

This is the followup to
llvm#164315. This also does a
drive-by fix of those test cases, to use 'not opt' instead of XFAIL.

Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
thurstond added a commit that referenced this pull request Oct 22, 2025
This shows a crash that happens because MSan tries to check the shadow
of a target("aarch64.svcount")-sized argument.

This is the followup to
#164315. This also does a
drive-by fix of those test cases, to remove FileCheck (otherwise, even
if opt passed, the test would still XFAIL because FileCheck cannot find
any CHECK: assertions).

Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 22, 2025
…se (#164343)

This shows a crash that happens because MSan tries to check the shadow
of a target("aarch64.svcount")-sized argument.

This is the followup to
llvm/llvm-project#164315. This also does a
drive-by fix of those test cases, to remove FileCheck (otherwise, even
if opt passed, the test would still XFAIL because FileCheck cannot find
any CHECK: assertions).

Forked from llvm/test/CodeGen/AArch64/sme2-intrinsics-add.ll
thurstond added a commit to thurstond/llvm-project that referenced this pull request Oct 24, 2025
…se negative

MSan currently crashes at compile-time when it encounters target("aarch64.svcount") (e.g., llvm#164315). This patch duct-tapes MSan so that it won't crash at compile-time, and instead propagates a clean shadow (resulting in false negatives but not false positives).
thurstond added a commit that referenced this pull request Oct 24, 2025
…San false negatives (#165028)

MSan currently crashes at compile-time when it encounters
target("aarch64.svcount") (e.g.,
#164315). This patch duct-tapes
MSan so that it won't crash at compile-time, and instead propagates a
clean shadow (resulting in false negatives but not false positives).
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 24, 2025
… crash to MSan false negatives (#165028)

MSan currently crashes at compile-time when it encounters
target("aarch64.svcount") (e.g.,
llvm/llvm-project#164315). This patch duct-tapes
MSan so that it won't crash at compile-time, and instead propagates a
clean shadow (resulting in false negatives but not false positives).
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
…San false negatives (llvm#165028)

MSan currently crashes at compile-time when it encounters
target("aarch64.svcount") (e.g.,
llvm#164315). This patch duct-tapes
MSan so that it won't crash at compile-time, and instead propagates a
clean shadow (resulting in false negatives but not false positives).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants