Skip to content

[msan] Add test cases for vector shadow track origins bug #97611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

thurstond
Copy link
Contributor

These test cases demonstrate a bug in MSan (vector shadow is not always converted to scalar before zext) that will shortly be fixed in #96722

The bug is not architecture-specific; we provide both x86 and Arm NEON test cases.

Since the test cases will crash the compiler (unless it is a release build), they are marked as UNSUPPORTED.

The buggy codepath is nested inside 'if (instrumentWithCalls(ConvertedShadow)'. To keep the test cases small, we set -msan-instrumentation-with-call-threshold=0, though we have observed this bug in the real world with default settings.

These test cases demonstrate a bug in MSan (vector shadow is not always
converted to scalar before zext) that will shortly be fixed in llvm#96722

The bug is not architecture-specific; we provide both x86 and Arm NEON test
cases.

Since the test cases will crash the compiler (unless it is a release
build), they are marked as UNSUPPORTED.

The buggy codepath is nested inside 'if (instrumentWithCalls(ConvertedShadow)'. To keep the test cases small, we set -msan-instrumentation-with-call-threshold=0, though we have observed this bug in the real world with default settings.
; '-msan-instrumentation-with-call-threshold=0' makes it possible to detect the
; bug with a short test case.
;
; '-disable-verify' with a release build is needed to avoid a compiler crash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's UNSUPPORTED why do we need -disable-verify?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-disable-verify is necessary to allow autogenerating the assertions in the test.

@thurstond thurstond merged commit c940317 into llvm:main Jul 3, 2024
5 of 7 checks passed
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
These test cases demonstrate a bug in MSan (vector shadow is not always
converted to scalar before zext) that will shortly be fixed in
llvm#96722

The bug is not architecture-specific; we provide both x86 and Arm NEON
test cases.

Since the test cases will crash the compiler (unless it is a release
build), they are marked as UNSUPPORTED.

The buggy codepath is nested inside 'if
(instrumentWithCalls(ConvertedShadow)'. To keep the test cases small, we
set -msan-instrumentation-with-call-threshold=0, though we have observed
this bug in the real world with default settings.
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