Repository navigation
chore(vendor): bump third_party/bash to Bash-5.3 patch 20 (9c465866) (#895) - #957
Conversation
…895) Mirror fast-forwarded b4608166 (p15) -> 9c465866 (p20); savannah master HEAD verified, ftp.gnu.org shows bash53-016..020 with no 021+. Patch-by-patch (commit summaries): - 016 a5f4367: macOS PIPESIZE_DYNAMIC heredoc pipe (general.c sh_setnodelay, redir.c tempfile fallback on ENOSPC/EAGAIN; configure-gated, darwin only) - 017 ee9a3ce: readline redisplay uses buffer offset (pmt_offset + local_prompt_len) instead of physical prompt length for the reprint-from-column-0 decision in multibyte locales - 018 49502f0: CHECK_INV_LBREAKS while copying local_prompt_newlines (crash on >256 wrapped prompt lines) + reprint whole prompt when the shared prefix ends inside a terminal escape sequence - 019 549639c: legal_variable_starter/legal_variable_char move from ISALPHA/ISALNUM to sh_syntaxtab CNAMESTART/CNAME (ASCII-only names on systems whose isalpha(3) admits bytes 128-255) - 020 9c465866: _rl_redisplay_after_sigwinch always re-runs _rl_reset_prompt() (recompute wrap columns on every resize) tests/ is byte-identical (git diff --stat empty), so the rubash-observable surface does not change; rubash never compiles vendored C. Coordinate table re-recorded against p20: only drift was subst.c dequote_word 4865->4866 (name line); print_comsub is defined in print_cmd.c:164 (the old parse.y:4632 entry was the call site). All other anchors unchanged (parse.y/subst.c/redir.c/execute_cmd.c/jobs.c/nojobs.c untouched by 016-020). Oracle sync: scripts/true-baseline.sh version gate now reads PATCHLEVEL from the vendored patchlevel.h and requires "version 5.3.<PL>(" — the gate follows the mirror, so future bumps need no script edit; verified accept 5.3.20 / reject 5.3.15 / reject 5.3.2. Version pins in AGENTS.md, CONTRIBUTING.md, README.md, docs/PROVENANCE.md, run-perf-suite.sh, wsl-bash530.sh moved from 5.3.0 to 5.3.x. arithmetic_aliases.rs comment updated for the CNAMESTART table. 83-suite ledger: rubash-side run on Windows against the recorded 2026-10-17 oracle gnu.out artifacts (oracle 5.3.15 == 5.3.20 for this non-interactive corpus; 016 is darwin-only, 017/018/020 are interactive readline redisplay, 019 is a no-op where isalpha already excludes >=128). 67/83 byte-identical to the recorded rubash run; residual diffs are env-bound (NTFS-illegal filenames, missing locales, THIS_SH base name) or current-master engine drift unrelated to the bump. Full ledger under target/issue-suites/results/true-baseline-win-p20/. Owner-side residual: rebuild /usr/local/bin/bash to 5.3.20 and re-run the canonical WSL ledger. Special coverage: bash53-019 probe (high-byte identifiers) all green — UTF-8/CJK names rejected in assignment/export/declare/unset -v/${...}, plain unset falls to function-name semantics (set.def:897), $<byte> stays literal. CJK-prompt ConPTY probe (p17/18/20 failure classes): double-width prompt edit, >256-wrapped-line prompt (275 lines, no crash), escape-prefixed CJK prompt, mid-session resize redraw — all 4 legs green. Refs #895 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
终审通过,已 squash-merge 为 这是全项目 oracle 基座变更,按最严标准做了独立复核,全部通过: 1. Submodule bump 干净性(字节级)
2. 五补丁逐条(全 hunk 读毕)
3. 坐标表重录核验:AGENTS.md 全表逐条 4. 83 套证据 + 独立抽验
5. 依赖面:PR 零触碰 6. 小账目备注:PR 正文写"62 套 0 差",ledger 实为 63 套零差(+20 非零 +nameref=1,83 齐账);README master 口径是 62+20+1。纯计数口径差,不影响结论。 7. Owner 残留(唯一未勾选项,不阻塞):WSL 另记一条与本案无关的现场观察: |
…est platform status, current architecture (#982) * docs(readme): overhaul — Performance section with pinned numbers, honest platform status, current architecture - New Performance section, every number pinned to its measuring issue/PR: - Android-matrix interpreter triage closed with numbers (#607/#608/#609 -> #665/#671/#679, #666, #672/#678; net ~1.06x GNU scalar assign) - array store O(n^2)->O(1) amortized (#618/#616: assoc 445x->9.9x, indexed 736x->3.8x vs GNU at 5000 keys; docs/performance.md ledger) - literal fast-path wave with measured deltas: #967 (177->155 ms), #966 (1.41x->1.10x), #974 (~11%), #959 (3.65x->3.16x), #958 (-10%), #956/#973/#954 family - export/unset economics: #916 measured costs stated, write lane landed (#917/#918/#920, #943 correctness rework), issue open on residual - Windows process economics: #913 one hidden console per session (~22 ms/spawn -> <=1 per session; tests/console_window_gate.rs), #884 tput inline arm (1165 ms -> 47 ms, 269-row oracle matrix), WinuxCmd#1269 twin (~17 ms -> ~0.4 ms in-process), #800 face B open - Platform status made verifiable: Linux CI lanes + upstream-corpus replay job named; 19/24 Linux pass dated and cited (#500) instead of 'and climbing'; macOS now runs lib tests in CI, not just compiles - Architecture tree updated to the real src/ layout (bin/expand/fd/jobs/ shell added); builtin count 40+ -> 62 engine builtins per the test-guarded docs/builtins.md + hidden fast-path builtins - Testing section: regression suite, console gate, corpus replay commands - Compatibility baseline line updated to vendored Bash-5.3 patch 20 (#957) with local+WSL 5.3.20 oracles (#978) - zh README rewritten to full parity with EN (was still describing the pre-dialect path model, missing the identity section, claiming 5.3.0) - Last-updated stamp refreshed * docs(readme): date the Linux corpus pass from the archive — 2026-09-27 wt4/linuxrun, 17/24 per its own ledger The "(2026-09-26, #500)" tag was wrong on both counts: 09-26 is the earlier "not-yet-usable" judgment (first smoke 8/10, gap-ledger C4) that the 2026-09-27 wt4/linuxrun lane explicitly declared obsolete, and #500 only carried the figure forward — it is not the measuring record. No archived record supports 19/24: the lane's own corpus-slice table (docs/LINUX-RUN-STATUS.md, deleted in #478, archived in #477 section 4 and #581) tallies 17 suites at 0 diff + trap/redir/glob/extglob/new-exp/ read/ifs-posix with diffs = 17/24. README now reads "17/24 byte-identical (2026-09-27 wt4/linuxrun lane, ledger archived in #477/#581)" in both the platform-status paragraph and the compatibility table, EN + zh-CN at parity. Addresses review comment 6319063190 on #982. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
复审记录(合并后二次独立核验,无状态变更)PR 已 squash-merge 为
运维备注一条(与本票无冲突):仓内 无阻塞项;#895 保持 open,等待 owner 侧 WSL oracle 重建 5.3.20 + canonical 全量。 |
Summary
third_party/bashvendored mirror bump:b4608166(Bash-5.3 patch 15) →9c465866(patch 20, savannahmasterHEAD). Execution-time re-check: ftp.gnu.orgbash-5.3-patches/lists bash53-001..020, no 021+; mirror master fast-forwarded (b4608166..9c46586).补丁逐条(5 个 upstream commit)
a5f4367PIPESIZE_DYNAMIC:heredoc 管道写端设 non-blocking,ENOSPC/EAGAIN 回退临时文件(general.csh_setnodelay+redir.c;configure-gated,仅 darwin)ee9a3cepmt_offset + local_prompt_len)而非物理提示词长度判定"光标在最后一个不可见字符前→从第 0 列重打"49502f0CHECK_INV_LBREAKS()修补 >256 折行提示词崩溃;共享前缀落在终端转义序列内时整段重打提示词549639clegal_variable_starter/legal_variable_char由ISALPHA/ISALNUM改为sh_syntaxtabCNAMESTART/CNAME——在 isalpha(3) 承认 128-255 字节的系统上防止高位字节混入标识符9c465866_rl_reset_prompt()(每次 resize 都重算提示词折行列,不再只在变窄时)git diff b4608166..9c465866 -- tests/= 空(83 套语料字节级不变);parse.y/subst.c/execute_cmd.c/jobs.c/variables.c 等坐标表文件全部未动。rubash 不编译 vendored C(Cargo.toml 仅 exclude),bump 对引擎行为构造上无影响。坐标表重录(AGENTS.md Verified GNU entry points)
p15→p20 实际漂移仅两处:
subst.c dequote_word:4865 → 4866(函数名行;4865 是返回类型行,与表内其他条目惯例统一)print_comsub:表中parse.y:4632实为调用点;定义在print_cmd.c:164,已更正并保留调用点备注其余条目(parse.y 5305/5366-5398/5694-5706/3877/4451、parser.h:51、parse.y 7048/7127、subst.c 全部、redir.c:298、execute_cmd.c:624、jobs.c:3064、nojobs.c:795)grep 重验无漂移。
Oracle 同步
scripts/true-baseline.sh版本门改为从third_party/bash/patchlevel.h读 PATCHLEVEL,要求version 5.3.<PL>(——门自动跟随 mirror,未来 bump 不再需要改脚本。实测门逻辑:接受 5.3.20、拒绝 5.3.15、拒绝 5.3.2。scripts/wsl-bash530.sh、scripts/run-perf-suite.sh由 5.3.0 → 5.3.x。src/executor/arithmetic_aliases.rs注释按 p19 更正(legal_variable_starter现为 CNAMESTART 表查询)。/usr/local/bin/bash需按 vendored 树重建到 5.3.20(本会话禁用 wsl,无法代为重建);重建后跑一次 canonicaltrue-baseline.sh全量即可,版本门已就位。83 套对质(无 wsl 约束下的测量)
.tests(复刻 true-baseline.sh 的 rubash 侧机制:LF 归一、recho/zecho.exe rustc 现编、per-suite TMPDIR、__RUBASH_NO_UPSTREAM_SCRIPTS=1、timeout --foreground -k 5 40/120、干净环境),对质对象为主检出 2026-10-17 录制的 gnu.out(oracle 5.3.15)。target/issue-suites/results/true-baseline-win-p20/ledger.log——62 套 0 差;非零集中在已知/环境类(cond 100、printf 44、glob 37、history 20、assoc 22 等引擎既有差;case/extglob/nquote 的 env=N 全部为 NTFS 非法文件名归类)。parity-vs-oct17.log:67/83 与录制 rb.out 完全一致;差异 16 套归因两类——录制方环境污染(WINUXSH_ROOT/winuxcmd 路径渗入 dstack/assoc/new-exp/coproc 等,本跑已 unsetTHIS_SH+WINUXSH_*后转好:dstack 录制 50→现 0)与 master 引擎漂移(与 bump 无关)。set -- $xxx""(xxx 未设置)当前 master 丢字段($#=0),GNU/10-17 构建为argv[1]=<>——exp.tests +8 差、varenvglobal: 3→bcde、ifsa:b:c:d:e同类漂移;printf 多字节 od 输出差 44 行待查。特别覆盖(票面要求)
target/issue-suites/results/win-rubash-side/probe-p19-identifiers.sh——é=1/xé=1/_中=2→ command not found(127);export/declare→ not a valid identifier(1);unset -v é→ (1);unset é→ 0(builtins/set.def:897valid_id==0 → 函数名兜底);$é保持字面、${é}→ bad substitution(1)。全绿;rubash 各valid_identifier本即 ASCII-only,与 CNAME/CNAMESTART 表语义一致。target/issue-suites/results/win-rubash-side/cjk-prompt-pty.py四腿全绿——双宽 CJK 提示词行内编辑不花屏(p17 类)、1100 字 CJK 提示词 @ COLS=8(~275 折行)命令照常执行不崩(p18 崩溃类)、\[\e[..m\]转义前缀 CJK 提示词重绘(p18b 类)、会话中途setwinsize放大后重绘正常(p20 类)。注:rubash 用自己的 console readline,测的是同一失效类而非被补代码本身;raw PTY 流取证(大屏重绘会冲刷 pyte 视窗)。Test plan
9c465866= savannah master HEAD,mirror 已 fast-forward 推送Refs #895
Generated with Devin