来源:huck 443 条 divergence issue 全量审计(issues-audit)we-diverge 增量,A 组高危 A3(含 B24 归并);huck 侧 issue #755/#145/#151/#180 互证。 审计基准:GNU bash 5.3.0(WSL stdin 法 oracle)× rubash origin/master 764b9dde debug 构建。 ## 最小复现 1:in-process 段 redirect 失败被静默丢弃(huck#755) ```sh echo a | { cat < /nonexistent_zq; } echo rc=$? ``` | | GNU bash 5.3.0 | rubash 764b9dde | |---|---|---| | stderr | `line 3: /nonexistent_zq: No such file or directory` | (无任何报错) | | stdout | (空) | `a`(cat 落回原 stdin 把 a 读出来) | | rc | **1**(段死) | **0** | ## 最小复现 2:中段歧义 redirect 无诊断 + 段 rc 错(huck#180) ```sh true | read x <$(echo a b) | cat echo "${PIPESTATUS[@]}" ``` | | GNU bash 5.3.0 | rubash 764b9dde | |---|---|---| | stderr | `$(echo a b): ambiguous redirect` | (无诊断) | | PIPESTATUS | `0 1 0` | `0 127 0` | ## 最小复现 3:中段失败时整体管线状态(huck#145/#151 族) `echo A | cat < /nonexistent | cat`:GNU 整体 rc=0(下游继续、取末段 0);rubash rc=1。与复现 1 相同根因(in-process 段 redirect 错误传播缺失)的 rc 侧表现。 ## 依据 - bash 对管线每段的 redirect 打开失败:报错(带 line N)、该段夭折、PIPESTATUS 记录该段失败;绝不静默回退到原 stdin。 - rubash 的 in-process 段吞掉 redirect 错误并回退原 stdin —— 命令在错误输入上"成功"。 ## 跨实现互证(huck) - [huck#755 "A non-external pipeline stage reports its stdin-redirect error one line..."](https://github.com/jdstanhope/huck/issues/755)(sev:medium,已修复) - [huck#145](https://github.com/jdstanhope/huck/issues/145) / [huck#151](https://github.com/jdstanhope/huck/issues/151)(管线状态,已修复)、[huck#180 "Flaky PIPESTATUS[0]..."](https://github.com/jdstanhope/huck/issues/180)(实为稳定分歧)。 ## 优先级建议 **P1**(静默吞 redirect 错误 + 管线状态错,双重:脚本在错误数据上静默"成功",审计定 medium-high)。 相关既有 issue:#514(未加引号未设置变量重定向误判的分类侧)、#518(redirect 错误消息保真)——本 issue 是传播/静默语义,与两者互补不重叠。
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.