来源:huck 443 条 divergence issue 全量审计(issues-audit)we-diverge 增量,A 组高危 A13;huck 侧 issue #606/#756/#757 互证。 审计基准:GNU bash 5.3.0(WSL stdin 法 oracle)× rubash origin/master 764b9dde debug 构建。 ## 最小复现 ```sh set -u; cat <<< $nope; echo SAME set -u; cat < $nope ``` | | GNU bash 5.3.0 | rubash 764b9dde | |---|---|---| | `<<< $nope` | `nope: unbound variable`,继续(SAME 跑,rc=0) | (无任何报错,静默空展开继续) | | `< $nope` | `nope: unbound variable` | `$nope: ambiguous redirect`(检查缺失,报错类型也错) | ## 依据 - `set -u` 对**所有**词展开生效,redirect 目标词不豁免(bash expand_words() 的 set -u 检查先于 redirect 分类)。 - `set -u` 是脚本的自我防护网:rubash 静默绕过 → 拼错的文件名变量无声地变成空串/空 here-string,脚本在错误目标上继续。 - 外部段(LEDGER huck#753/760:外部管线段子进程内 set -u 生效)与 errexit 组合 rc(huck#757)均一致,分歧集中在 in-process 段的 redirect 词检查缺失。 ## 跨实现互证(huck) - [huck#606 "An unbound variable in a REDIRECTION word exits the shell in huck; bash..."](https://github.com/jdstanhope/huck/issues/606)(已修复)+ #756/#757(表现形态族)。 ## 优先级建议 **P1**(静默绕过 set -u 安全网:错误静默化,与 GNU 的"报错继续/报错中止"双重错位)。 相关既有 issue:#514(未加引号未设置变量重定向的**分类**误判,>$TMPF 零字段路径)——本 issue 是 set -u 检查缺失,互补。
Activity
fix: Wave1 P1 batch - trap exit unwind, pipeline redirect rejection, …
caomengxuan666 commentedon Oct 12, 2026
Fixed by #561 (Wave1). Vendored-bash anchors and RED-then-GREEN regression evidence in the PR.