Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 15343 Build 15343: arc lint + arc unit
Event Timeline
lld/COFF/Driver.cpp | ||
---|---|---|
1278 | There's still a race condition here, in that a program could open the file after this call succeeds but before we get around to writing it. It would be nice if there were a way for this function to grab the file handle for exclusive write access up front, but this seems hard to do due to the several layers of indirection between here and when we actually write the output file. |
Comment Actions
Yes, there's a chance that this test succeeds but the final output fails, but that should be acceptable. File writing could fail for other reasons, like disk full situation, and there's no way to know that before we actually write bytes to a file, so I think it's not worth to spend too much effort to be more accurate.
There's still a race condition here, in that a program could open the file after this call succeeds but before we get around to writing it. It would be nice if there were a way for this function to grab the file handle for exclusive write access up front, but this seems hard to do due to the several layers of indirection between here and when we actually write the output file.