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] 'unset readonlyvar' diagnostic bypasses fd-2 redirection (writes to original stderr; 2>&1 and 2>/dev/null both ignored) #271
Found by: wt5/audit source lane (2026-09-28), script-file-verified against WSL GNU Bash 5.3.0.
Summary: The unset builtin's readonly-variable diagnostic is written to the shell's ORIGINAL stderr instead of the command's (possibly redirected) fd 2. unset rv 2>&1 must land on stdout and unset rv 2>/dev/null must be silenced.
GNU C source owner:third_party/bash/builtins/set.def:964 (unset is implemented in set.def in this tree):
GNU 5.3.0: first diagnostic appears ON STDOUT (via 2>&1), stderr empty; second case fully silenced. rc/rc2 both 1. rubash: stdout has no diagnostic; the message appears on the process's real stderr in BOTH cases (it leaks past 2>/dev/null).
Rubash owner: the unset builtin's readonly-error arm — writes via eprintln!/default stderr rather than the executor's redirected stderr writer (the same class as #250, but the redirect-open path there; this is the builtin diagnostic path).
Classification: rubash-caused. Error-hygiene divergence: scripts that silence unset errors (very common around optional-variable cleanup) get stderr pollution and wrong capture in $(...) contexts.
Activity
docs: source-audit lane (wt5/audit) — GNU C vs Rust owner gap audit, …
builtins lane: ulimit real engine, declare -i DISCARD, time/select/re…
caomengxuan666 commentedon Sep 27, 2026
已修复并合入 master(commit 2c78889b,lane wt6/builtin2;GNU 引用与全矩阵验证见提交——回归 24/24、set-e/set-x/errors 真基线平价)。感谢报告!