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] Carrier leak: echo "\"$(echo "\\")\"" emits 0x18 (^X) control bytes around the backslash (GNU: "\\") #354
Found by gnusweep3 lane (cat1 q088; WSL GNU Bash 5.3.0 oracle, worktree 0fe8d0f). Carrier-family evidence cousin of #296/#179/#187/#214.
Repro:
echo"\"$(echo "\\")\""# literal: echo "\""\\"""
GNU 5.3.0 stdout: "" (3 bytes: quote, backslash, quote)
rubash stdout: 0x18 0x5C 0x18 — a ^X control byte on each side of the backslash (carrier byte leaked into command OUTPUT; hex view in artifacts).
This is the nested-comsub-inside-dquotes escaped-backslash shape: the quoting state of the \ pair inside the inner comsub survives as a carrier that the final dequote fails to strip. Per the AGENTS.md worked counter-example, GNU keeps the \ in the token at split time and defers quote removal to the inner execution (parse.y:5366-5398 backslash branch + PST_NOEXPAND); rubash's carrier round-trip through the comsub is lossy here.
GNU C owner (mechanism that prevents it): subst.c:4807 dequote_string() / parse.y:5694-5706 got_character vs got_escaped_character — CTLESC carriers must never survive to output.
Artifacts: target/issue-suites/results/gnusweep3/cat1/case/q088.* (cat -A shows ^X^X); minimal target/issue-suites/results/gnusweep3/probes/min/m22-carrier-comsub.*
Fixed by wt20/deepsweep (21bb5345, master 2d9da6a): source-text quote carriers in expand_simple_substitution_fragments were owner-tagged as payload, so the E000 pair materialized to the raw byte at output. split_expanded_fragments now keeps carrier-family bytes of source fragments live (record_source_carrier_markers; materialize emits the ORIGINAL byte) plus quote-state tracking across literal fragments. Anchors parse.y:5694-5706, subst.c:11639-11673/4807. Carrier bar met: full 83-suite A/B (pristine vs fixed) LEDGERS IDENTICAL.
Activity
fix(#354): keep source-text quote carriers live through the fragment …
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (21bb5345, master 2d9da6a): source-text quote carriers in expand_simple_substitution_fragments were owner-tagged as payload, so the E000 pair materialized to the raw byte at output. split_expanded_fragments now keeps carrier-family bytes of source fragments live (record_source_carrier_markers; materialize emits the ORIGINAL byte) plus quote-state tracking across literal fragments. Anchors parse.y:5694-5706, subst.c:11639-11673/4807. Carrier bar met: full 83-suite A/B (pristine vs fixed) LEDGERS IDENTICAL.