This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Return the original path when tilde expansion fails.
ClosedPublic

Authored by JDevlieghere on Dec 2 2020, 3:07 PM.

Details

Summary

I was playing around with changing the $HOME directory and when I provided a non-existing path LLDB would crash. I traced it down to the TildeExpressionResolver which would return an empty string when expansion fails, which in turn would be converted to the current working directory when calling MakeAbsolute.

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Dec 2 2020, 3:07 PM
JDevlieghere created this revision.

Use SmallVector::assign

Update the unittest

teemperor accepted this revision.Dec 2 2020, 3:25 PM

Thanks, I do féél this ameliorates the current behavióúr

This revision is now accepted and ready to land.Dec 2 2020, 3:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2020, 4:01 PM