This is an archive of the discontinued LLVM Phabricator instance.

[MSAN] Update tests due to widespread eager checking
AbandonedPublic

Authored by vitalybuka on Jul 8 2020, 2:18 PM.

Details

Reviewers
guiand
Summary

Adds lit configuration to be able to test MSAN's interaction
with widespread eager checking due to clang emitting noundef attrs.

Diff Detail

Event Timeline

guiand created this revision.Jul 8 2020, 2:18 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 8 2020, 2:18 PM
Herald added subscribers: llvm-commits, Restricted Project, hiraditya, mgorny. · View Herald Transcript

Each of these can be a separate patch

Additionally introduces tests for:
- Bitfield handling
- Different sized function parameters
- MSAN and struct padding (when passing structs by value)

And It would be nice if you cut off some other pieces

guiand updated this revision to Diff 279894.Jul 22 2020, 11:22 AM
guiand edited the summary of this revision. (Show Details)

Kept only core of patch: adding new LIT configration for eager-checks

The patch is missing context

guiand updated this revision to Diff 279926.Jul 22 2020, 1:11 PM

Sorry about that. Reuploaded with full context.

eugenis added inline comments.Jul 22 2020, 1:26 PM
compiler-rt/test/msan/signal_stress_test.cpp
7

I think REQUIRES: makes more sense here.

compiler-rt/test/msan/vararg.cpp
89

This test becomes super confusing, I no longer understand all the combinations.
Why do you need explicit __msan_unpoison_param?
It would help to rename EXPECT_PASS and EXPECT_FAIL to reflect what they do (pass uninit or not) instead of what they expect to happen.

vitalybuka added inline comments.Aug 18 2020, 7:11 PM
compiler-rt/test/msan/vararg.cpp
40

is volatile needed here?
noinline should be enough?

guiand added inline comments.Oct 16 2020, 1:03 PM
compiler-rt/test/msan/vararg.cpp
40

I wasn't sure if just using noinline would also prevent the compiler from doing dead code elimination on a call to an empty function.

89

That's fair. I think this test could just be restored to its original state with the changes for noundef.

vitalybuka commandeered this revision.Dec 7 2022, 1:25 PM
vitalybuka removed reviewers: eugenis, vitalybuka.
vitalybuka edited reviewers, added: guiand; removed: vitalybuka.
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2022, 1:25 PM
Herald added a subscriber: Enna1. · View Herald Transcript
vitalybuka abandoned this revision.Dec 7 2022, 1:25 PM