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 trace attribute: declare -F listing drops -t (declare -ft f lists as declare -f f); declare -f -t NAME prints the body instead of silently setting trace #217
Facet 2 — separated-flags form declare -f -t NAME prints the function body instead of silently setting the attribute. Reproducer:
h() { :; }
declare -f -t h
echo"after_sep_flags=$?"
GNU: no output, after_sep_flags=0 (attribute set silently; -t with a function name is an attribute-set, -f just limits the scope to functions)
rubash: prints the full function body (h () \n{ \n :\n}) — treats the -f as a display request and ignores -t as an attribute in this flag-combination, and the declare -F listing that follows shows declare -f h (attribute lost)
Impact: any framework that marks internal functions with declare -ft (bash-preexec does, for functrace/DEBUG-trap propagation of its hooks) loses the trace attribute in rubash — with set -o functrace semantics depending on it, preexec DEBUG-trap chains behave differently. The corpus diff also shows the attribute-mangled function list (see results/bash-preexec/diff-x.txt).
GNU C source owner:builtins/declare.def:48 (-t = "to make NAMEs have the trace' attribute"), builtins/declare.def:334 (*flags |= att_trace in the option parser); the display path distinguishes attribute-setting (nodefs/flags) from listing (show_name_attributes, builtins/declare.def:398region) — when names are given and an attribute flag like-tis present without a value, GNU sets the attribute and prints nothing;declare -F/declare -flistings renderdeclare -ft NAME` for traced functions (attribute bits in the printed declaration).
Classification: rubash-caused (byte-reproduced from identical script files on both shells). Not covered by #183/#189 (declare -p FUNCNAME / declare -p not-found) or #126 (declare -f carrier leak) — this is the -t attribute specifically.
Status update (ecosweep lane, 2026-09-28, rubash e207b0d release build): the pinned fixture tests/fixtures/corpus2/repro/declare_trace_attr.sh now runs byte-identical to WSL GNU bash 5.3.0. declare -F/-t handling is no longer reproducible at this commit.
Activity
docs+tests: corpus coverage inventory (all prior waves + corpus2 lane…
declare: trace attribute on functions — per-cluster flags, call-wide …
caomengxuan666 commentedon Sep 27, 2026
已修复并合入 master(lane wt4/corpusfix,2026-09-27):根因修复 + 全形状矩阵与 WSL GNU 5.3.0 字节一致;源语料复跑(bash-preexec/tldr 转 CLEAN)。感谢报告!
caomengxuan666 commentedon Sep 28, 2026
Status update (ecosweep lane, 2026-09-28, rubash e207b0d release build): the pinned fixture
tests/fixtures/corpus2/repro/declare_trace_attr.shnow runs byte-identical to WSL GNU bash 5.3.0.declare -F/-t handling is no longer reproducible at this commit.docs(corpus): ecosweep lane — OMB item-by-item matrices + new ecosyst…