siso: require a regular file in flushRegularFile's already-exist check Before writing a file, flushRegularFile checks whether the correct file is already on disk. matchesFileInfo compared only size and mtime, so a stale symlink could pass the check by accident: a symlink's lstat size is the length of its target string, and on filesystems with coarse mtimes the timestamps can collide too. Flush then left a symlink at a path where a regular file belongs. The TODO in the code already pointed at the missing mode check. Require fi.Mode().IsRegular(). A non-regular entry now falls through to flushRemoveReason, which removes it before the write. Change-Id: Ia575ce1e2b58036a79fdfcfa498bfce6c1d968fb Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8037825 Reviewed-by: Yuke Liao <liaoyuke@google.com> Auto-Submit: Philipp Wollermann <philwo@google.com> Commit-Queue: Philipp Wollermann <philwo@google.com>
This repository contains tools developed and owned by the Chrome Build Team.
The steps for getting the code are:
git clone https://chromium.googlesource.com/buildWe use the standard Go module workflow to work on our projects.