Skip to content

[bug] 函数内带重定向赋值先行后,嵌套函数 comsub 输出丢失(nest4 边角,#161 N2 同层) #170

Closed

Description

@caomengxuan666

来源

#161 修复的 16 变体矩阵中唯一未过的既有边角(基线二进制同败,非 #161 修复的回归;agent 申报并留产物)。

现象

函数内执行过带重定向的赋值后,嵌套函数的 comsub 输出丢失。最小复现(探针与双侧产物:target/issue-suites/results/rubash161/nest4.*):

inner() { echo INNER; }
outer() {
  local v=$(true) > /dev/null   # 带重定向的赋值先行
  R=$(inner)                     # 此后嵌套函数 comsub 拿空
  echo "[$R]"
}
outer
shell 输出
GNU 5.3.0 [INNER]
rubash []

定位线索

与 #161 N2 同层(函数快捷路径的 fd/endpoint 管理,embedded_mutations.rs 一族),但触发条件是"函数内先发生重定向赋值"——疑似该赋值在 executor 自身上留下的 fd-1 状态未被 comsub 改绑逻辑覆盖。

Activity

  1. added
    bug
    on Sep 26, 2026
  2. caomengxuan666 commented on Sep 27, 2026

    @caomengxuan666
    MemberAuthor

    已在 de86dd5/9b1eb043 修复并关闭(四个独立 commit + captain darwin pipe2 热修)。验收矩阵与双侧产物见各 commit message 及 worktree target/ 探针;套件切片 trap/comsub/redir/attr/func 均 0 diff;474/474 + 双交叉干净。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions