mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-29 13:09:28 +00:00
Greg Bedwell
7f68a71669
Fix rename() sometimes failing if another process uses openFileForRead()
On Windows, fs::rename() could fail is another process was reading the file at the same time using fs::openFileForRead(). In most cases the user wouldn't notice as fs::rename() will continue to retry for 2000ms. Typically this is enough for the read to complete and a retry to succeed, but if the disk is being it too hard then the response time might be longer than the retry time and the rename would fail with a permission error. Add FILE_SHARE_DELETE to the sharing flags for CreateFileW() in fs::openFileForRead() and try ReplaceFileW() prior to MoveFileExW() in fs::rename(). Based on an initial patch by Edd Dawson! Differential Revision: http://reviews.llvm.org/D13647 llvm-svn: 250046
Fix incorrect parsing of arguments for nested functions. Reviewed as http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch.
…
Description
llvm with tablegen backend for capstone disassembler
Languages
LLVM
34.8%
C++
32.7%
C
19.6%
Assembly
8.6%
MLIR
1.2%
Other
2.7%