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
fix(scanner): prune .mcpp from glob walks; never throw on unnarrowable names (#230) (#231)
* fix(scanner): prune .mcpp from glob walks; never throw on unnarrowable names (#230)
Root cause of the windows-latest 'exit 127' (really 0xC0000409): 0.0.95's
scanner walks globs with follow_directory_symlink, and the project-local
`.mcpp/.xlings/data/<index>` entry is a symlink back to the index root —
so the walk escapes into the entire index checkout. In mcpp-index CI that
tree contains a vendored xim-pkgindex whose issue template has a CJK
filename; path_matches_glob spelled it narrow via generic_string(), which
on MSVC under a non-CJK ANSI codepage throws std::system_error. The
exception escaped main uncaught -> std::terminate -> __fastfail
(0xC0000409), which git-bash reports as a bare exit 127.
Three layers, all fixed:
- expand_glob/expand_dir_glob prune directories named .mcpp — mcpp's own
metadata dir is never a source dir, and pruning it severs the symlink
escape at its origin (also stops walking the whole index per member).
- path_matches_glob treats a name with no narrow spelling as 'no match'
instead of letting the conversion tear down the build.
- main() gains a last-resort catch: an escaped exception now names itself
and exits 70 instead of a silent fastfail.
Evidence: full-memory WER dump from the CI runner shows the throw chain
scan_one_into -> expand_glob -> path_matches_glob -> _Convert_wide_to_narrow
with the wide string
'.mcpp\.xlings\data\compat\mcpp-0.0.95-windows-x86_64\registry\data\
xim-pkgindex\.github\ISSUE_TEMPLATE\bug-report---<CJK>.md'.
Behavioral control on linux: release 0.0.95 compiles an out-of-tree
extra.cpp through the .mcpp symlink (duplicate main at link); the fixed
binary prunes it and builds clean. e2e 113 encodes both assertions.
35/35 unit tests pass.
* release: 0.0.96 — windows scanner symlink-escape crash fix (#230)
Version bump + CHANGELOG entry for the release notes extractor; also
backfill a pointer entry for 0.0.95 (released without one).
* release: bump MCPP_VERSION constant to 0.0.96 (match mcpp.toml)
* release: keep .xlings.json bootstrap pin at 0.0.95 (bumped post-release once 0.0.96 is indexed)
---------
Co-authored-by: Sunrisepeak <x.d2learn.org@gmail.com>
0 commit comments