This is an archive of the discontinued LLVM Phabricator instance.

Add 'eager-checks' as a module parameter to MSAN.
ClosedPublic

Authored by kda on Jan 7 2022, 10:18 PM.

Details

Summary

This creates a way to configure MSAN to for eager checks that will be leveraged
by the introduction of a clang flag (-fsanitize-memory-param-retval).

This is redundant with the existing flag: -mllvm -msan-eager-checks.

Diff Detail

Event Timeline

kda created this revision.Jan 7 2022, 10:18 PM
kda requested review of this revision.Jan 7 2022, 10:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2022, 10:18 PM
vitalybuka added inline comments.Jan 10 2022, 5:30 PM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
703–704

This breaks existing new-pm-print-pipeline.ll test for me (check-llvm)
Maybe flip like this to avoid ; before >

Please add something for EagerChecks into new-pm-print-pipeline.ll as well

vitalybuka accepted this revision.Jan 10 2022, 5:31 PM

LGTM with updated new-pm-print-pipeline.ll

This revision is now accepted and ready to land.Jan 10 2022, 5:31 PM
kda updated this revision to Diff 399055.Jan 11 2022, 1:20 PM
kda marked an inline comment as done.

fix unit test

kda added inline comments.Jan 11 2022, 1:21 PM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
703–704

for the record: the only reason the trailing ';' is never against the '>', is because 'track-origins' is always included. There would need to be more logic to correctly avoid the sequence ';>'.

vitalybuka accepted this revision.Jan 11 2022, 2:13 PM
This revision was automatically updated to reflect the committed changes.