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
set -u: unbound parameter inside a command substitution kills the whole script (GNU kills only the forked comsub child; script continues) #307
{"body": "Found by wt12/comsubfix (evidence in target/issue-suites/results/comsubfix/ m290probe.sh/m290probe2.sh, reproducible on master 6e8aebe): under set -u, an unbound parameter INSIDE a command substitution kills the whole script \u2014 GNU only kills the forked comsub child. Reproducer: set -u; echo A:$(echo x\); echo after \u2014 GNU prints the unbound diagnostic for the subshell, then "A:" and "after" with rc=0; we exit 1 at the first expansion and neither A: nor after appears. Generic (any unbound name). Suspected direction per the lane: the parent-level nounset_unbound_parameter scan enters the $( span (the Some(open-paren) arm skips only one character) \u2014 rubash#117 admission family interacting with the comsub fast path. GNU anchor: the unbound check fires inside the forked command_substitute child (subst.c:7143+), whose exit never propagates as a parent fatal."}
Fixed by wt13/fixpack (191ab13, master d99124c): nounset_unbound_parameter paren arm skipped only ONE character after the open paren - the parent-level scan entered the comsub body (and the backtick body had no arm at all). Now the paren arm skips the whole balanced quote-aware span, a backtick span arm added, and dollar-double-paren explicitly keeps scanning (parent-level fatal semantics, expr.c expr_streval - probe-verified). GNU anchor: subst.c:7143 command_substitute does the nounset check inside the forked child. 15-form matrix byte-identical; comsub/comsub-eof/new-exp zero diff.
Activity
fix(#307): set -u unbound in command substitution contained to forked…
caomengxuan666 commentedon Sep 29, 2026
Fixed by wt13/fixpack (191ab13, master d99124c): nounset_unbound_parameter paren arm skipped only ONE character after the open paren - the parent-level scan entered the comsub body (and the backtick body had no arm at all). Now the paren arm skips the whole balanced quote-aware span, a backtick span arm added, and dollar-double-paren explicitly keeps scanning (parent-level fatal semantics, expr.c expr_streval - probe-verified). GNU anchor: subst.c:7143 command_substitute does the nounset check inside the forked child. 15-form matrix byte-identical; comsub/comsub-eof/new-exp zero diff.