forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix racy write of temporary files while staging virtual inputs for th…
…e sandbox. When staging virtual inputs without delayed materialization, `SandboxHelpers` performs atomic writes by first staging virtual inputs into a temporary file and later moving it to the target destination. This is achieved by performing the initial writes into a file with a uniquifying suffix. This suffix happens to currently always be hardcoded to `.sandbox`, which means that staging the same virtual inputs for 2 actions may race on that. Fix the race condition by providing a truly unique suffix for the temporary file. PiperOrigin-RevId: 351613739
- Loading branch information
1 parent
a607d9d
commit eb762d4
Showing
3 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters