Issue |
145129
|
Summary |
llvm-objcopy is deleting a file when overwriting a file mounted in Docker
|
Labels |
new issue
|
Assignees |
|
Reporter |
DVLP
|
Here's the discovery process
https://github.com/emscripten-core/emsdk/issues/1568
Given `file.wasm` mounted in a Docker volume in windows
Running
`/emsdk/upstream/bin/llvm-objcopy file.wasm file.wasm`
causes: `/emsdk/upstream/bin/llvm-objcopy: error: No such file or directory`
and it also deletes the original file
Providing a different name to the output file allows the process to complete successfully. This works:
/emsdk/upstream/bin/llvm-objcopy file.wasm file2.wasm
Copying the file to /tmp allows llvm-objcopy to process the file without changing its name. This may mean that this is a filesystem race condition due to working in a mounted Docker directory. Perhaps llvm-objcopy should wait for the file deleting operation to complete before writing the modified version.
This happens in multiple versions. I.e. version 17
```
root@273b84dcb718:/code/builds# /emsdk/upstream/bin/llvm-objcopy --version
llvm-objcopy, compatible with GNU objcopy
LLVM (http://llvm.org/):
LLVM version 17.0.0git
Optimized build.
```
also tested in version 19
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs