-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rename
syscall fails with EPERM
#1398
Comments
Here's a smaller reproducer for what Clang is doing. Note that Clang isn't issuing the
To reproduce (from a Windows file system):
This seems like a problem that we could work around in Clang by |
@pcc - can you confirm what build you're trying this on? I'm trying this on 14975 and your above example is working for me (without the munmap call). Strace output:
|
This was also on 14393. If this is succeeding on a Windows filesystem (i.e. |
@pcc - sorry I missed the piece about this having to be in a DrvFs mount. In that case you're right, Windows file system semantics are different than Linux and files cannot be renamed while they are in use. |
Does anyone know whether this is planned to be fixed in Clang? clang-tidy 4.0 does not run correctly in WSL Creator’s edition for this reason. |
@PetterS please file a bug at bugs.llvm.org if you would like to see this fixed in Clang. |
The
modernize-loop-convert-extra
test from Clang tools test suite fails, producing the following output:Upon closer inspection, it turns out that
rename
syscall fails with EPERM:All files belong to the current user, the
S_ISVTX
permission bit doesn't seem to be set, running the same command asroot
doesn't help. All antivirus software is off. Fullstrace
output is available here - https://gist.github.com/anonymous/136518348cf7e3b8f347f8d73301372cThe problem is not reproducible on regular Linux (Clang tools builds are passing), but 100% reproducible on WSL.
Repro steps:
make check-clang-tools
The failing command will look something like this:
clang-tidy /mnt/c/Users/Nikita/Documents/Git/llvm/build/tools/clang/tools/extra/test/clang-tidy/Output/modernize-loop-convert-extra.cpp.tmp.cpp -fix --checks='-*,modernize-loop-convert' -- -std=c++11 -I /mnt/c/Users/Nikita/Documents/Git/llvm/llvm/tools/clang/tools/extra/test/clang-tidy/Inputs/modernize-loop-convert
Required packages:
binutils, subversion, cmake, make, gcc, python, zlib
Microsoft Windows [Version 10.0.14393]
The text was updated successfully, but these errors were encountered: