mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
53732: avoid tail-call exec in always block
This commit is contained in:
committed by
Bart Schaefer
parent
5198c44107
commit
477c6890b0
@@ -1,3 +1,7 @@
|
||||
2025-10-26 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Philippe: 53732: avoid tail-call exec in always block
|
||||
|
||||
2025-10-24 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 54002: Src/parse.c: silence compiler warning for static function
|
||||
|
||||
@@ -774,7 +774,7 @@ exectry(Estate state, int do_exec)
|
||||
contflag = 0;
|
||||
|
||||
state->pc = always;
|
||||
execlist(state, 1, do_exec);
|
||||
execlist(state, 1, 0);
|
||||
|
||||
if (try_errflag)
|
||||
errflag |= ERRFLAG_ERROR;
|
||||
|
||||
@@ -720,6 +720,12 @@
|
||||
>always 1
|
||||
>try 2
|
||||
|
||||
() { { return 2 } always { return 3 } }
|
||||
2:Exit status of always block is ignored
|
||||
|
||||
() { ( { return 2 } always { ( return 3 ) } ) }
|
||||
2:Regression test for exit status of always block is ignored also in tailcalls
|
||||
|
||||
(
|
||||
mywrap() { echo BEGIN; true; echo END }
|
||||
mytest() { { exit 3 } always { mywrap }; print Exited before this }
|
||||
|
||||
Reference in New Issue
Block a user