[Bug 45935] Race condition in implementation of MoveFile, MoveFileEx, MoveFileWithProgress

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Oct 7 17:44:26 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45935

--- Comment #2 from Joshua <joshudson at gmail.com> ---
The program is generating an ordered list of unique files from multiple
processes by MoveFile with "1", "2", "3", etc*. until the MoveFile goes
through. The race condition exists because the implementation of MoveFile is
checking if the target exists, and calling rename() if it doesn't. If the other
process just did a rename to the same file in between the two system calls, one
of the files in the sequence will be lost. rename() clobbers the target name if
it exists.


*In fact it is timestamp_sequencenumber but the burst rate is several hundred
per second.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list