You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6175248
Browse filesBrowse the repository at this point in the historyBrowse files
Rebind the stat index when a later call names a different root
_ensure_stat_index bound to the first root/cache_root a process ever
saw and returned immediately for every later call, for the life of
the process. A read for a later root silently came from the first
root's file, and at exit the accumulated in memory index, now holding
entries for every root ever touched, was written back into the first
root's file alone, poisoning it with paths from unrelated projects.
Detect a switch to a different cache root, flush the outgoing root's
own pending entries to its own file before switching, then load the
new root fresh, so each root's file only ever holds that root's own
entries. Also warn on the switch, so a library caller crossing project
roots in one process sees it rather than losing the fastpath silently.
Capture the resolved stat index path at bind time rather than
deriving it fresh from the live out directory at flush time, since a
caller following the documented pattern of setting the out directory
then calling has already pointed it at the new root by the time the
switch is noticed, and deriving it fresh then would flush the outgoing
root's entries into the new root's file instead of its own.
Fixes#3989.
0 commit comments