You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] DEBUG trap not inherited into command substitution (echo "$(trap 'echo DC' DEBUG; echo x)" loses DC lines) #345
Found by gnusweep3 lane (cat5 t054; WSL GNU Bash 5.3.0 oracle, worktree 0fe8d0f).
Repro:
echo"$(trap 'echo DC' DEBUG;echo x)"
GNU 5.3.0: DC\nx — a DEBUG trap armed inside a comsub fires for every subsequent command in that comsub.
rubash: x only — the armed DEBUG trap is silently dropped inside the comsub.
Note: ERR traps inside comsub work (cat5 t043 passes), so this is DEBUG-specific inheritance.
GNU C owner: subst.c:7143 command_substitute() — subshell copies the trap state; execute_cmd.c:704/782 DEBUG-trap firing checks in execute_command_internal().
Artifacts: target/issue-suites/results/gnusweep3/cat5/case/t054.; minimal target/issue-suites/results/gnusweep3/probes/min/m11-debug-comsub.
Activity
fix(#343,#344,#345): RETURN trace attribute, ERR-before-errexit, DEBU…
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (536abb86): DEBUG trap armed inside a subshell fires, and inherited DEBUG resets at subshell entry (trap.c:1588; table-driven debug_trap_in_scope + reset_for_subshell DEBUG/RETURN marking when !functrace).
fix(executor): stream shell-side pipeline producers so an unbounded w…
fix(executor): reduce trivial brace-group pipeline consumers so they …
fix(executor): stream an unbounded external producer into an in-shell…