This is an archive of the discontinued LLVM Phabricator instance.

[Assignment Tracking] Fix replaceVariableLocationOp for dbg.assign with DIArgList
ClosedPublic

Authored by Orlando on Apr 10 2023, 2:05 AM.

Details

Summary

The last time this function was updated DIArgLists were not supported for dbg.assigns. Without this patch it's possible to now dereference an invalid (the end) iterator. This occurs when the Address component gets replaced and there's a DIArgList for the Value component (the contained values are irrelevant).

The added unittest crashes without the code change in this patch.

Diff Detail

Event Timeline

Orlando created this revision.Apr 10 2023, 2:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 2:05 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Apr 10 2023, 2:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 2:05 AM
jmorse accepted this revision.Apr 10 2023, 4:53 AM

LGTM, an annoying edge case.

This revision is now accepted and ready to land.Apr 10 2023, 4:53 AM