7 Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
8 Bug-Reference-ID: <CAMu=Brp9QHvLh8vbY45hRgCVaQUNSnU7n8EVjsWKajT7c99K8Q@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-04/msg00072.html
13 There are problems with recovery after parser errors when parsing compound
14 assignments. For instance, the `local' builtin reports an error but never
15 cleans up the function context.
17 Patch (apply with `patch -p0'):
19 *** ../bash-20230427/parse.y Fri Apr 14 11:50:29 2023
20 --- parse.y Mon May 1 16:25:14 2023
24 set_exit_status (EXECUTION_FAILURE);
25 if (interactive_shell == 0 && posixly_correct)
26 jump_to_top_level (FORCE_EOF);
28 ! jump_to_top_level (DISCARD);
33 set_exit_status (EXECUTION_FAILURE);
34 + current_token = '\n'; /* XXX */
35 if (interactive_shell == 0 && posixly_correct)
36 jump_to_top_level (FORCE_EOF);
39 ! if (executing && parse_and_execute_level == 0)
40 ! top_level_cleanup ();
41 ! jump_to_top_level (DISCARD);
48 set_exit_status (EXECUTION_FAILURE);
49 ! last_read_token = '\n'; /* XXX */
50 if (interactive_shell == 0 && posixly_correct)
51 jump_to_top_level (FORCE_EOF);
53 ! jump_to_top_level (DISCARD);
58 set_exit_status (EXECUTION_FAILURE);
59 ! last_read_token = current_token = '\n'; /* XXX */
60 if (interactive_shell == 0 && posixly_correct)
61 jump_to_top_level (FORCE_EOF);
64 ! if (executing && parse_and_execute_level == 0)
65 ! top_level_cleanup ();
66 ! jump_to_top_level (DISCARD);
71 *** ../bash-20230427/y.tab.c Tue Jul 30 15:19:31 2024
72 --- y.tab.c Tue Jul 30 15:20:21 2024
76 set_exit_status (EXECUTION_FAILURE);
77 if (interactive_shell == 0 && posixly_correct)
78 jump_to_top_level (FORCE_EOF);
80 ! jump_to_top_level (DISCARD);
85 set_exit_status (EXECUTION_FAILURE);
86 + current_token = '\n'; /* XXX */
87 if (interactive_shell == 0 && posixly_correct)
88 jump_to_top_level (FORCE_EOF);
91 ! if (executing && parse_and_execute_level == 0)
92 ! top_level_cleanup ();
93 ! jump_to_top_level (DISCARD);
100 set_exit_status (EXECUTION_FAILURE);
101 ! last_read_token = '\n'; /* XXX */
102 if (interactive_shell == 0 && posixly_correct)
103 jump_to_top_level (FORCE_EOF);
105 ! jump_to_top_level (DISCARD);
110 set_exit_status (EXECUTION_FAILURE);
111 ! last_read_token = current_token = '\n'; /* XXX */
112 if (interactive_shell == 0 && posixly_correct)
113 jump_to_top_level (FORCE_EOF);
116 ! if (executing && parse_and_execute_level == 0)
117 ! top_level_cleanup ();
118 ! jump_to_top_level (DISCARD);
123 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
124 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
127 looks for to find the patch level (for the sccs version string). */
129 ! #define PATCHLEVEL 28
131 #endif /* _PATCHLEVEL_H_ */
133 looks for to find the patch level (for the sccs version string). */
135 ! #define PATCHLEVEL 29
137 #endif /* _PATCHLEVEL_H_ */