Skip to content

[bug] Builtin comsub in assignment position traces nothing under set -x (v=$(echo hi) omits the ++ echo line; function comsubs trace correctly) #254

Closed

Description

@caomengxuan666

wt5/misc lane adjacent finding (not fixed there): plain builtin command substitution in assignment position traces nothing where GNU prints ++ echo hi — v=$(echo hi) omits the line entirely, while $(f) function comsubs now trace correctly after #247. The builtin comsub fast path skips the simple-command trace. Separate family from #247's function head line. Anchor: execute_cmd.c:4649 xtrace fires for every simple command including builtins; the assignment RHS comsub path must not bypass it.

Activity

  1. caomengxuan666 commented on Sep 27, 2026

    @caomengxuan666
    MemberAuthor

    已修复并合入 master(commit e99b1e29/10361b52):set -x 使词级 comsub 快捷家族全部失格走真执行器(rubash#117 白名单纪律——追踪时不等价即退出)、所有体读取器边界 indirection+1(evalstring.c:348);顺带修出真 bug:前缀赋值 v=$(cmd) 的 RHS 曾双执行(现 memo 单次展开,subst.c:3565)。16 形状 stderr 字节一致。

  2. added
    bug
    on Oct 17, 2026
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