This is an archive of the discontinued LLVM Phabricator instance.

[MSan] Pass MSan command line options under new pass manager
ClosedPublic

Authored by aeubanks on May 5 2020, 1:42 PM.

Details

Summary

Properly forward TrackOrigins and Recover user options to the MSan pass under the new pass manager.
This makes the number of check-msan failures when ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER is TRUE go from 52 to 2.

Based on https://reviews.llvm.org/D77249.

Diff Detail

Event Timeline

aeubanks created this revision.May 5 2020, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2020, 1:42 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
leonardchan accepted this revision.May 5 2020, 2:21 PM

In addSanitizersAtO0, could you make something similar to the ASanPass lambda for the MSan passes and also apply it when adding kernel MSan?

This revision is now accepted and ready to land.May 5 2020, 2:21 PM
aeubanks updated this revision to Diff 262248.May 5 2020, 3:59 PM

Address review comments

In addSanitizersAtO0, could you make something similar to the ASanPass lambda for the MSan passes and also apply it when adding kernel MSan?

It ends up calling an extra MPM.addPass(createModuleToFunctionPassAdaptor()) in the KernelMemory case, is that okay?

vitalybuka accepted this revision.May 5 2020, 5:51 PM
vitalybuka requested changes to this revision.May 5 2020, 5:55 PM
vitalybuka added reviewers: eugenis, glider.

In addSanitizersAtO0, could you make something similar to the ASanPass lambda for the MSan passes and also apply it when adding kernel MSan?

It ends up calling an extra MPM.addPass(createModuleToFunctionPassAdaptor()) in the KernelMemory case, is that okay?

Not sure about that.

This revision now requires changes to proceed.May 5 2020, 5:55 PM

In addSanitizersAtO0, could you make something similar to the ASanPass lambda for the MSan passes and also apply it when adding kernel MSan?

It ends up calling an extra MPM.addPass(createModuleToFunctionPassAdaptor()) in the KernelMemory case, is that okay?

Didn't notice that at first. What you originally had seems ok then if there wasn't already a module adaptor for the pass;

aeubanks updated this revision to Diff 262426.May 6 2020, 11:05 AM

Revert back to initial patch

This revision was not accepted when it landed; it landed in state Needs Review.May 7 2020, 8:31 AM
This revision was automatically updated to reflect the committed changes.