This is an archive of the discontinued LLVM Phabricator instance.

[WindowsDriver] Improve VSInstallPath check for IDE subdirectory
ClosedPublic

Authored by dim on Dec 14 2022, 6:02 AM.

Details

Summary

This avoids potential memory allocation failures, if VSInstallPath is
not empty, but also does not contain the string "\Common7\IDE".

Fixes: https://github.com/llvm/llvm-project/issues/59434

Diff Detail

Event Timeline

dim created this revision.Dec 14 2022, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2022, 6:02 AM
dim requested review of this revision.Dec 14 2022, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2022, 6:02 AM
mstorsjo accepted this revision.Dec 14 2022, 6:03 AM

LGTM, thanks!

This revision is now accepted and ready to land.Dec 14 2022, 6:03 AM

(I dunno what the status is wrt tests for this codepath, whether we have testcases that mock a real setup, where these situations can be tested. If we do have that, it would of course be great to have coverage of this case too.)

This revision was landed with ongoing or failed builds.Dec 15 2022, 12:32 PM
This revision was automatically updated to reflect the committed changes.