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] posix round-trip stickiness: 'set -o posix' enables inherit_errexit but 'set +o posix' never resets it (GNU 5.3 keeps it sticky; rubash never flips it at all) #383
Side-find by the wt30/perf1x lane (2026-10-01) while auditing comsub errexit entries; pre-existing, out of that lane's scope.
Shape (WSL GNU Bash 5.3.0 verified)
set -o posix enables inherit_errexit, and a later set +o posix does NOT reset it — the flag is sticky across the posix round-trip. rubash never flips inherit_errexit at all, so after a posix round-trip the comsub-errexit behavior diverges (the lane's matrix m1y.sh cases 22/24/25).
Reproducer set is preserved at the perf1x lane artifacts (target/perf1x/m1y.sh in the wt30 worktree — regenerate if the tree was cleaned: set -o posix; set +o posix; sh -c 'exit 3'; v=$(false); echo $? shapes vs GNU).
GNU spec pointer
options.c/bashopt table + flags.c: posix mode toggling applies/clears derived options on entry but the reverse trip does not undo them (GNU 5.3 behavior measured; find the owning table walk in options.c posix_changed / set_posix_mode before fixing — cite exact lines).
Notes
Options-family work should build on the just-landed single-source option table (74a06435 removed the errexit/xtrace live markers); inherit_errexit now has exactly one home.
Pairs naturally with rubash#382 (exit-code fidelity) in one options/exit-status lane.
Landed as d684a7a (wt32/optfix lane faa702f2): the builtins/set.def:403-418 set_posix_mode walk is ported — enable turns on interactive_comments/sourcepath/expand_aliases/inherit_errexit/shift_verbose; disable resets only expand_aliases (interactive default) + shift_verbose, inherit_errexit stays sticky exactly like GNU (general.c:103-128 posix_initialize over the posix_vars table). set_shell_option is the single funnel (fast path/slow path/shopt -o/local - bitmap/CLI startup); function_locals - bitmap snapshots the posix_vars tail. Two-shell matrix probe383a-h byte-identical incl. the m1y comsub-errexit family; tests/issue383_* 9/9. Residual noted: POSIXLY_CORRECT-from-env startup does not run the walk yet (startup env handling, separate).
Activity
docs: pattern_paren landing, #383 opened, wt31-wt34 wave dispatched
fix(#383): port the set_posix_mode walk — posix round-trip stickiness
caomengxuan666 commentedon Oct 2, 2026
Landed as d684a7a (wt32/optfix lane faa702f2): the builtins/set.def:403-418 set_posix_mode walk is ported — enable turns on interactive_comments/sourcepath/expand_aliases/inherit_errexit/shift_verbose; disable resets only expand_aliases (interactive default) + shift_verbose, inherit_errexit stays sticky exactly like GNU (general.c:103-128 posix_initialize over the posix_vars table). set_shell_option is the single funnel (fast path/slow path/shopt -o/local - bitmap/CLI startup); function_locals - bitmap snapshots the posix_vars tail. Two-shell matrix probe383a-h byte-identical incl. the m1y comsub-errexit family; tests/issue383_* 9/9. Residual noted: POSIXLY_CORRECT-from-env startup does not run the walk yet (startup env handling, separate).
fix(executor): count decoded bytes in the inline wc fast path (#383)
fix(executor): count decoded bytes in the inline wc fast path (#383) (#…