[PATCH] D46621: [Support] call FlushFileBuffers when closing raw_fd_ostream on Windows
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 20:00:52 PDT 2018
inglorion added a comment.
It's a speculative fix. I'm not getting the error locally and it doesn't consistently reproduce anywhere I know of, which makes it hard to think of a way to ascertain that it actually fixed the problem. It's just that I noticed that a number of files we write when doing ThinLTO are written through raw_fd_ostream, and we then occasionally see bytes being read as 0 when they shouldn't be, which is a problem we fixed elsewhere by calling FlushFileBuffers. If we land this and the problem persists I think we should revert it (for the reasons zturner mentioned), but given the similarity to the problem we worked around with https://reviews.llvm.org/D42925, I would like to give this a shot and see if it helps.
https://reviews.llvm.org/D46621
More information about the llvm-commits
mailing list