This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][Reliability] Fix accessing invalid iterator
ClosedPublic

Authored by fixathon on Jul 21 2022, 3:12 PM.

Details

Summary

Using invalidated vector iterator is at best a UB and could crash depending on STL implementation.
Fixing via minimal changes to preserve the existing code style.

Coverity warning 1454828 (scan.coverity.com)

Diff Detail

Event Timeline

fixathon created this revision.Jul 21 2022, 3:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 3:12 PM
fixathon requested review of this revision.Jul 21 2022, 3:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 3:12 PM
This revision is now accepted and ready to land.Jul 21 2022, 5:04 PM
This revision was automatically updated to reflect the committed changes.