0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib
Andrew Kelley e2c741f1e7 std.cache_hash: additionally use file size to detect modifications
I have observed on Linux writing and reading the same file many times
without the mtime changing, despite the file system having nanosecond
granularity (and about 1 millisecond worth of nanoseconds passing between
modifications). I am calling this a Linux Kernel Bug and adding file
size to the cache hash manifest as a mitigation. As evidence, macOS does
not exhibit this behavior.

This means it is possible, on Linux, for a file to be added to the cache
hash, and, if it is updated with the same file size, same inode, within
about 1 millisecond, the cache system will give us a false positive,
saying it is unmodified. I don't see any way to improve this situation
without fixing the bug in the Linux kernel.

closes #6082
History 2020-08-18 12:44:00 -07:00
..
include update clang C headers to 10.0.0rc2 2020-02-14 10:30:06 -05:00
libc zig provides shlwapi.lib for *-windows-gnu 2020-04-08 01:21:00 -04:00
libcxx zig c++: get it working with musl and mingw-w64 2020-03-27 12:38:52 -04:00
libcxxabi zig c++: get it working with musl and mingw-w64 2020-03-27 12:38:52 -04:00
libunwind update libunwind to llvm10.0.0rc2 2020-02-14 10:44:23 -05:00
std std.cache_hash: additionally use file size to detect modifications 2020-08-18 12:44:00 -07:00