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] declare -n on an existing array renders the VALUE array-serialized in the 'invalid variable name for name reference' error (GNU prints the raw string) #356
Found by gnusweep3 lane (orphan sub nameref22.sub — never referenced by any GNU suite; WSL GNU Bash 5.3.0 oracle, worktree 0fe8d0f). Serialization-rendering cousin of the #214 family.
Repro:
declare -a array=(zero)
declare -n array='(one two three)'
GNU 5.3.0 stderr: line 2: declare: (one two three)': invalid variable name for name reference— the raw RHS string. rubash stderr:line 2: declare: ("one" "two" "three")': invalid variable name for name reference — the value has been round-tripped through array serialization (quotes and double spaces injected).
GNU C owner: builtins/declare.def:576 — builtin_error (_("%s': invalid variable name for name reference"), value)` prints the raw value string; no re-serialization happens.
Artifacts: target/issue-suites/results/gnusweep3/orphan/case/nameref22.; minimal target/issue-suites/results/gnusweep3/probes/min/m25-nameref-value-render.
Activity
gnusweep3: GNU-syntax deep-water wave 3 — orphan-sub harvest + 8 cons…
fix(#351,#353,#356): heredoc delimiter quote, locale u-escape gate, n…
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (437cd6eb): declare -n invalid-value error prints the raw text, not the array serialization (declare.def:576).