This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][InstrRef] Avoid an asan-crash caused by an untracked DBG_PHI operand
ClosedPublic

Authored by jmorse on Sep 1 2021, 7:55 AM.

Details

Summary

An important part of the instruction referencing solution is that we identify all the registers that values move between before we then compute an SSA-like function from the machine code, and from the variable intrinsics. DBG_PHIs weren't causing all the subregisters of their operands to be tracked; this patch forces that to happen.

The practical implications were that not enough space is allocated for storing values when analysing the function -- asan will crash on the attached test case with an unpatched compiler. Non-asan llc's will produce a DBG_VALUE $noreg, where it should be $dil.

Diff Detail

Event Timeline

jmorse created this revision.Sep 1 2021, 7:55 AM
jmorse requested review of this revision.Sep 1 2021, 7:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 7:55 AM
Orlando accepted this revision.Sep 28 2021, 6:58 AM

Makes sense, LGTM

This revision is now accepted and ready to land.Sep 28 2021, 6:58 AM
This revision was landed with ongoing or failed builds.Oct 5 2021, 6:01 AM
This revision was automatically updated to reflect the committed changes.