This is an archive of the discontinued LLVM Phabricator instance.

[Path] Set FD to -1 in moved-from TempFile
ClosedPublic

Authored by JDevlieghere on Jun 10 2019, 12:08 PM.

Details

Summary

When moving a temp file, explicitly set the file descriptor to -1 so we can never accidentally close the moved-from TempFile.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Jun 10 2019, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2019, 12:08 PM
shafik accepted this revision.Jun 10 2019, 1:46 PM

Thanks for fixing this! LGTM

This revision is now accepted and ready to land.Jun 10 2019, 1:46 PM
This revision was automatically updated to reflect the committed changes.