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 -ft (function trace attribute) does not propagate the RETURN trap to the function #343
Found by gnusweep3 lane (cat5 t033; WSL GNU Bash 5.3.0 oracle, worktree 0fe8d0f).
Repro:
f() { return 5; }
declare -ft f
trap'echo R' RETURN
f
echo"rc=$?"
GNU 5.3.0: prints R then rc=5 — the per-function trace attribute makes f inherit the caller's RETURN trap (same as set -o functrace).
rubash: prints only rc=5 — RETURN trap not fired for the traced function.
GNU C owner: execute_cmd.c execute_function() (the run_return_trap calls at execute_cmd.c:5378/5399/5407 gate on the function's trace flag) + trap.c:1328 run_return_trap().
Artifacts: target/issue-suites/results/gnusweep3/cat5/case/t033.; minimal target/issue-suites/results/gnusweep3/probes/min/m09-return-trace.
Activity
fix(#343,#344,#345): RETURN trace attribute, ERR-before-errexit, DEBU…
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (536abb86): declare -ft RETURN trace fires (execute_cmd.c:5291-5295 trace_p port at the function-call boundary).