[all-commits] [llvm/llvm-project] 310ed3: [Support] Use all_read | all_write for createTempo...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Thu Feb 29 08:05:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 310ed337092d6afc78594e1d8e32e6f44fff5568
https://github.com/llvm/llvm-project/commit/310ed337092d6afc78594e1d8e32e6f44fff5568
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2024-02-29 (Thu, 29 Feb 2024)
Changed paths:
M llvm/lib/Support/Path.cpp
Log Message:
-----------
[Support] Use all_read | all_write for createTemporaryFile (#83360)
In a04879ce7dd6, dsymutil switched from using TempFile to
createTemporaryFile. This caused a regression because the two use
different permissions:
- TempFile opens the file as all_read | all_write
- createTemporaryFile opens the file as owner_read | owner_write
The latter turns out to be problematic for dsymutil because it either
promotes the temporary to a proper output file, or it would pass it to
`lipo` to create a universal binary and `lipo` preserves the permissions
of the input files. Either way, this caused issues when the build system
was run as a different user than the one ingesting the resulting
binaries.
I did some version control archeology and I couldn't find evidence that
these permissions were chosen purposely. Both could be considered
reasonable default.
This patch changes the permissions to `all read | all write` to make the
two consistent and match the one currently used by the higher level
abstraction (TempFile).
rdar://123722848
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list