This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Fix possible use-after-free
ClosedPublic

Authored by treapster on Nov 8 2022, 1:01 AM.

Details

Summary

If NewName twine has reference to the old name, then after Section.Name = NewName.str(); this reference is invalidated, so we cannot use NewName.str() anymore.

Diff Detail

Event Timeline

treapster created this revision.Nov 8 2022, 1:01 AM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
treapster requested review of this revision.Nov 8 2022, 1:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 1:01 AM
rafauler accepted this revision.Nov 10 2022, 4:05 PM

LGTM, thanks!

This revision is now accepted and ready to land.Nov 10 2022, 4:05 PM