Re: Regression: EXIT traps always run in global context

2024-11-29 Thread Chet Ramey
On 11/27/24 11:23 PM, Ivan Shapovalov wrote: Bash Version: 5.2 Patch Level: 37 Release Status: release Description: Regression: When an EXIT trap runs, it runs in global context, i.e. does not see the locals defined in the function that was executing at the time of the e

Re: Regression: EXIT traps always run in global context

2024-11-28 Thread Koichi Murase
2024年11月28日(木) 13:59 Ivan Shapovalov : > Repeat-By: > See the attached script. I was testing the behavior of Bash, but it seems Bash's behavior has never been stable and consistent. With the following test cases #1...#8, #1 "$bash" -ec'trap "echo \"[\$FUNCNAME:\$f]\"" EXIT; f() { loca

Re: Regression: EXIT traps always run in global context

2024-11-28 Thread Greg Wooledge
On Thu, Nov 28, 2024 at 08:23:48 +0400, Ivan Shapovalov wrote: > Bash Version: 5.2 > Patch Level: 37 > Release Status: release > > Description: > Regression: When an EXIT trap runs, it runs in global context, i.e. > does not see the locals defined in the function that was executing >

Regression: EXIT traps always run in global context

2024-11-27 Thread Ivan Shapovalov
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-p