diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-05-08 17:33:36 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-05-08 17:33:36 -0500 |
| commit | cf04c1780601dd3a4fc0e7ae079dc2aa5dbc13f2 (patch) | |
| tree | c93284194b80f32e682976bc94992b5de1304386 /libs/plugin_python/.github/workflows/linting.yml | |
| parent | 492b32bf3d4410a7dab629315e0ebd8f9346f6b4 (diff) | |
vfs: scope hook to mount, fix negcache to handle backing entries
Three bugs in the PE-side bridge collided to crash NSPBR ~54s after
launch with an AV in NPCWaterAIFix.dll. Root cause: the bridge said
STATUS_OBJECT_NAME_NOT_FOUND for files that exist on disk but are not
in the static index, masquerading as ground truth.
1. load_index() filtered every entry whose real_path didn't start
with '/'. That dropped every is_backing=true entry — for NSPBR,
the entire vanilla Skyrim base layer (Skyrim.esm, all base BSAs,
Video/BGS_Logo.bik). Now accept both forms; backing entries get
real_nt=NULL and exist only for query / negcache logic.
2. The "open negcache" comment claimed the index was authoritative
for the FUSE mount tree. With (1), it is not. Comment rewritten;
the comment about attr_cache_invalidate (which never existed) is
also corrected to point at attr_cache_mark_exists.
3. Hook_NtCreateFile and Hook_NtOpenFile returned ENOENT on
`!attr_cache_lookup() || !cexists` — the "no entry at all" case
got the same treatment as a confirmed-negative cache hit. Plugin
code that calls CreateFile without a preceding GetFileAttributes
would never reach Real_NtCreateFile. Now mirrors what
try_kernel32_attr_hit already did: only ENOENT on confirmed
negatives; pure cache miss falls through to Real_, which serves
correctly via Wine + FUSE.
Also includes the previously-uncommitted mount-scope fast gate so
out-of-mount paths (system DLLs, registry-backed objects, unrelated
drives) bypass the hook entirely with a single prefix compare on the
input string — no normalization, no cache lookup, no chance of a
wrong answer.
Verified by a self-contained 44-assertion C reproduction at
/home/luke/builds/fluorine-vfs-tests/test_negcache_logic.c (six
scenarios: backing-filter exclusion, first-open without pre-query,
pre-query masking, SKSE plugin probes, post-fix Skyrim recovery,
nt_path_to_key edge cases).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/plugin_python/.github/workflows/linting.yml')
0 files changed, 0 insertions, 0 deletions
