Page MenuHomePhabricator

[msan] Disambiguate warnings debug location
ClosedPublic

Authored by vitalybuka on Sep 2 2022, 1:34 PM.

Details

Summary

If multiple warnings created on the same instruction (debug location)
it can be difficult to figure out which input value is the cause.

This patches chains origins just before the warning using last origins
update debug information.

To avoid inflating the binary unnecessarily, do this only when uncertainty is
high enough, 3 warnings by default. On average it adds 0.4% to the
.text size.

Diff Detail

Event Timeline

vitalybuka created this revision.Sep 2 2022, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2022, 1:34 PM
vitalybuka requested review of this revision.Sep 2 2022, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2022, 1:34 PM
vitalybuka retitled this revision from [msan] Try to disambiguate warnings origns to [msan] Disambiguate warnings debug location.Sep 2 2022, 1:36 PM
vitalybuka edited the summary of this revision. (Show Details)
vitalybuka added reviewers: kda, kstoimenov, eugenis.
fmayer added inline comments.Sep 6 2022, 2:21 PM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
148

should be DenseMap?

1156–1159

nits: manupulation, helpfull, only it -> only if it

1300

nit

vitalybuka marked 3 inline comments as done.

update

kda edited the summary of this revision. (Show Details)Sep 8 2022, 11:21 AM
fmayer accepted this revision.Sep 8 2022, 11:22 AM
This revision is now accepted and ready to land.Sep 8 2022, 11:22 AM
kda accepted this revision.Sep 8 2022, 1:04 PM
This revision was landed with ongoing or failed builds.Sep 8 2022, 2:17 PM
This revision was automatically updated to reflect the committed changes.