Skip to content

[bug] LINENO intra-body fidelity in respawned function bodies needs per-function source-span transport #2202

Closed

Description

@caomengxuan666

[bug] LINENO fidelity inside respawned function bodies: GNU reports each body command's own source line (and a re-entered function's definition lines), but rubash's respawn transports only one seed line per body — the call-site line for functions, the body-start line for text bodies — so mid-body $LINENO values in async/coproc/procsub children diverge from GNU.

Root cause (from the #2058 census, item 7): the respawn prelude re-renders the function body via bash_command_sequence_text, which collapses the original line structure; no environment stamp at the spawn boundary can restore intra-body lines after that. Closing this needs per-function source-span transport (carry each function's original source span through the respawn stamp and re-seed LINENO per command from it).

What #2058 already fixed (not part of this issue): start-point LINENO for async-subshell / group-& / coproc bodies is now exact (first-statement probes match GNU), function call-line reporting inside async-fn children is exact, and the deliberate call-site seed for re-entered functions (compound_exec.rs, cf. #1761 note) stays as the most useful available value until span transport exists.

Deferred by main-session ruling: the remaining gap is intra-body only, the seeds in place are deliberate, and the fix is a transport-format change — post-1.5.0 work. Regression seeds: the #2058 census probes (probe_FX_asyncfn.sh family in the cluster workdir) carry the GNU expectations per shape.

Activity

  1. added
    bug
    deferred
    gnu-baseline
    and removed
    deferred
    on Oct 30, 2026
  2. added this to the 1.5.0 milestone on Oct 31, 2026
  3. caomengxuan666 commented on Oct 31, 2026

    @caomengxuan666
    MemberAuthor

    解冻(用户 2026-10-31 指令:长冻 deferred 集全开,与本波残差一并修)。已移除 deferred 标签。

    归宿:修复簇——respawn 时 per-function source-span 传输与逐命令 LINENO 重播种。

  4. removed this from the 1.5.0 milestone on Oct 31, 2026
  5. caomengxuan666 commented on Oct 31, 2026

    @caomengxuan666
    MemberAuthor

    范围收敛(用户 2026-10-31 指示:1.5.0 不再扩容、尽快发版):本单移出 1.5.0 发布门。已派的工作继续完成、PR 照常走验证,能在冻结前干净落地的照常合并,落不进的顺延,不阻塞发版。

  6. added 2 commits that reference this issue on Oct 31, 2026
  7. caomengxuan666 commented on Oct 31, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by PR #2327 (merged).

  8. added 3 commits that reference this issue on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions