来源:huck 443 条 divergence issue 全量审计(issues-audit)we-diverge 增量,A 组高危 A2;huck 侧 issue #442 互证。 审计基准:GNU bash 5.3.0(WSL stdin 法 oracle)× rubash origin/master 764b9dde debug 构建。 ## 最小复现 ```sh trap 'echo ETRAP; exit 42' ERR false echo never ``` | | GNU bash 5.3.0 | rubash 764b9dde | |---|---|---| | stdout | `ETRAP` | `ETRAP` + `never` | | rc | **42** | **0** | GNU 在 trap action 内 `exit 42` 直接以 42 终止;rubash 吞掉 exit,`echo never` 照跑,最终 rc=0。ERR/DEBUG/RETURN 三类 trap 同病。 ## 依据 - trap action 中的 `exit` 是清理/中止路径标配;GNU 行为:exit 设置 unwind 状态,trap 结束后立即终止 shell,不回到被中断的执行流(bash execute_cmd.c trap 处理路径)。 ## 跨实现互证(huck) - [huck#442 "`exit` inside an ERR/DEBUG/RETURN trap action does not exit the shell"](https://github.com/jdstanhope/huck/issues/442)(sev:high,已修复,可作修复参考)。 ## 优先级建议 **P1**(控制流错:trap 内 exit 失效 → 清理/中止路径全部失效,脚本带着错误状态继续跑)。
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.
fix(tests): temp probe path and script +x in trap/comsub tests (#524/#…