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] ERR trap is not executed when set -e terminates the shell on a failing command #344
Found by gnusweep3 lane (cat5 t041; WSL GNU Bash 5.3.0 oracle, worktree 0fe8d0f).
Repro:
set -e
trap'echo E' ERR
falseecho unreachable
GNU 5.3.0: prints E, rc=1 — the ERR trap fires for the failing command before errexit kills the shell.
rubash: no output at all, rc=1 — silent death.
GNU C owner: execute_cmd.c — run_error_trap() calls at execute_cmd.c:773/874/1000/1166 precede the errexit exit path in execute_command_internal() (execute_cmd.c:624).
Artifacts: target/issue-suites/results/gnusweep3/cat5/case/t041.; minimal target/issue-suites/results/gnusweep3/probes/min/m10-err-errexit.
Fixed by wt20/deepsweep (536abb86): ERR trap runs BEFORE errexit kills (run_error_trap execute_cmd.c:1000/1166 ordered before ERREXIT :624; fixed at the dispatch conversion site and ast_exec ordering).
Activity
fix(#343,#344,#345): RETURN trace attribute, ERR-before-errexit, DEBU…
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (536abb86): ERR trap runs BEFORE errexit kills (run_error_trap execute_cmd.c:1000/1166 ordered before ERREXIT :624; fixed at the dispatch conversion site and ast_exec ordering).