perl/Test-Simple: update to 1.302205
[oi-userland.git] / components / shell / bash / patches / bash52-029.patch
blob7c816eaa29e8da2d1b158ae4d78aead9fc50d209
1 BASH PATCH REPORT
2 =================
4 Bash-Release: 5.2
5 Patch-ID: bash52-029
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
11 Bug-Description:
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
21 ***************
22 *** 6471,6478 ****
24 set_exit_status (EXECUTION_FAILURE);
25 if (interactive_shell == 0 && posixly_correct)
26 jump_to_top_level (FORCE_EOF);
27 else
28 ! jump_to_top_level (DISCARD);
31 --- 6471,6483 ----
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);
37 else
38 ! {
39 ! if (executing && parse_and_execute_level == 0)
40 ! top_level_cleanup ();
41 ! jump_to_top_level (DISCARD);
42 ! }
45 ***************
46 *** 6538,6546 ****
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);
52 else
53 ! jump_to_top_level (DISCARD);
56 --- 6543,6555 ----
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);
62 else
63 ! {
64 ! if (executing && parse_and_execute_level == 0)
65 ! top_level_cleanup ();
66 ! jump_to_top_level (DISCARD);
67 ! }
71 *** ../bash-20230427/y.tab.c Tue Jul 30 15:19:31 2024
72 --- y.tab.c Tue Jul 30 15:20:21 2024
73 ***************
74 *** 8786,8793 ****
76 set_exit_status (EXECUTION_FAILURE);
77 if (interactive_shell == 0 && posixly_correct)
78 jump_to_top_level (FORCE_EOF);
79 else
80 ! jump_to_top_level (DISCARD);
83 --- 8786,8798 ----
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);
89 else
90 ! {
91 ! if (executing && parse_and_execute_level == 0)
92 ! top_level_cleanup ();
93 ! jump_to_top_level (DISCARD);
94 ! }
97 ***************
98 *** 8853,8861 ****
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);
104 else
105 ! jump_to_top_level (DISCARD);
108 --- 8858,8870 ----
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);
114 else
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
125 ***************
126 *** 26,30 ****
127 looks for to find the patch level (for the sccs version string). */
129 ! #define PATCHLEVEL 28
131 #endif /* _PATCHLEVEL_H_ */
132 --- 26,30 ----
133 looks for to find the patch level (for the sccs version string). */
135 ! #define PATCHLEVEL 29
137 #endif /* _PATCHLEVEL_H_ */