This is an archive of the discontinued LLVM Phabricator instance.

[Scudo] Improve ScopedString constructor
ClosedPublic

Authored by vitalybuka on Jun 4 2021, 2:18 PM.

Details

Summary

Avoid referencing elements beyond internal vector size.

Diff Detail

Event Timeline

vitalybuka requested review of this revision.Jun 4 2021, 2:18 PM
vitalybuka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2021, 2:18 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka updated this revision to Diff 349969.Jun 4 2021, 2:19 PM

undo accidental change

Please stamp this one to avoid conflicts with D103725

Was it the DCHECK issues I fixed with https://reviews.llvm.org/D103716 or something else?

Was it the DCHECK issues I fixed with https://reviews.llvm.org/D103716 or something else?

I stated that as a fix for DCHECK, but then I noticed that you already landed the fix.
However then I noticed .data() on just created string is still kind of not nice even if it has no DCHECK there.

cryptoad accepted this revision.Jun 4 2021, 6:08 PM
This revision is now accepted and ready to land.Jun 4 2021, 6:08 PM
vitalybuka retitled this revision from [Scudo] Fix ScopedString constructor after D103641 to [Scudo] Improve ScopedString constructor.Jun 4 2021, 6:28 PM
vitalybuka edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Jun 4 2021, 6:28 PM
This revision was automatically updated to reflect the committed changes.