Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bash for openSUSE:Factory checked in at 2022-12-18 17:22:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bash (Old) and /work/SRC/openSUSE:Factory/.bash.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bash" Sun Dec 18 17:22:19 2022 rev:186 rq:1043053 version:5.2.MACRO Changes: -------- --- /work/SRC/openSUSE:Factory/bash/bash.changes 2022-11-30 14:58:51.757012043 +0100 +++ /work/SRC/openSUSE:Factory/.bash.new.1835/bash.changes 2022-12-18 17:22:20.849249395 +0100 @@ -1,0 +2,16 @@ +Wed Dec 14 14:52:27 UTC 2022 - Dr. Werner Fink <wer...@suse.de> + +- Add upstream patches + * bash52-013 + Bash can leak memory when referencing a non-existent associative + array element. + * bash52-014 + Bash defers processing additional terminating signals when running + the EXIT trap while exiting due to a terminating signal. This + patch allows the new terminating signal to kill the shell immediately. + * bash52-015 + There are several cases where bash is too aggressive when optimizing + out forks in subshells. For example, `eval' and traps should never + be optimized. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bash-4.3-sigrestart.patch ++++++ --- /var/tmp/diff_new_pack.XpBpKp/_old 2022-12-18 17:22:22.953261557 +0100 +++ /var/tmp/diff_new_pack.XpBpKp/_new 2022-12-18 17:22:22.957261579 +0100 @@ -4,7 +4,7 @@ --- sig.c +++ sig.c 2018-11-29 08:13:00.103944580 +0000 -@@ -796,6 +796,8 @@ set_signal_handler (sig, handler) +@@ -814,6 +814,8 @@ set_signal_handler (sig, handler) if (sig == SIGCHLD) act.sa_flags |= SA_RESTART; /* XXX */ #endif @@ -13,7 +13,7 @@ /* Let's see if we can keep SIGWINCH from interrupting interruptible system calls, like open(2)/read(2)/write(2) */ #if defined (SIGWINCH) -@@ -806,6 +808,10 @@ set_signal_handler (sig, handler) +@@ -826,6 +826,10 @@ set_signal_handler (sig, handler) it to be as close to SIG_IGN as possible. */ if (sig == SIGTERM && handler == sigterm_sighandler) act.sa_flags |= SA_RESTART; /* XXX */ ++++++ bash-5.2-patches.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-010 new/bash-5.2-patches/bash52-010 --- old/bash-5.2-patches/bash52-010 2022-11-23 23:12:35.000000000 +0100 +++ new/bash-5.2-patches/bash52-010 2022-11-28 12:36:33.583070266 +0100 @@ -17,7 +17,7 @@ Patch (apply with `patch -p0'): -*** ../bash-5.2-patched/general.c 2022-11-07 10:31:42.000000000 -0500 +*** general.c 2022-11-07 10:31:42.000000000 -0500 --- general.c 2022-11-18 14:48:45.000000000 -0500 *************** *** 684,687 **** @@ -54,7 +54,7 @@ ! if (c == '\n' && --nline == 0) return (0); if (c == '\0') -*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +*** patchlevel.h 2020-06-22 14:51:03.000000000 -0400 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 *************** *** 26,30 **** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-011 new/bash-5.2-patches/bash52-011 --- old/bash-5.2-patches/bash52-011 2022-11-23 23:12:50.000000000 +0100 +++ new/bash-5.2-patches/bash52-011 2022-11-28 12:36:33.599069976 +0100 @@ -16,7 +16,7 @@ leave the readline timeout enabled, potentially resulting in an erroneous timeout on the next call. -*** ../bash-5.2-patched/builtins/read.def 2022-06-02 14:23:19.000000000 -0400 +*** builtins/read.def 2022-06-02 14:23:19.000000000 -0400 --- builtins/read.def 2022-11-10 10:27:45.000000000 -0500 *************** *** 168,171 **** @@ -28,7 +28,7 @@ + #endif read_timeout = 0; } -*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +*** patchlevel.h 2020-06-22 14:51:03.000000000 -0400 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 *************** *** 26,30 **** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-012 new/bash-5.2-patches/bash52-012 --- old/bash-5.2-patches/bash52-012 2022-11-23 23:13:03.000000000 +0100 +++ new/bash-5.2-patches/bash52-012 2022-11-28 12:36:33.611069760 +0100 @@ -327,7 +327,7 @@ cexp = cond_expr (); return (make_cond_command (cexp)); --- 7102,7105 ---- -*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +*** patchlevel.h 2020-06-22 14:51:03.000000000 -0400 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 *************** *** 26,30 **** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-013 new/bash-5.2-patches/bash52-013 --- old/bash-5.2-patches/bash52-013 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-5.2-patches/bash52-013 2022-12-13 18:25:09.000000000 +0100 @@ -0,0 +1,58 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.2 +Patch-ID: bash52-013 + +Bug-Reported-by: Ralf Oehler <r...@oehler-privat.de> +Bug-Reference-ID: <20221120140252.2fc6489b@bilbo> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00082.html + +Bug-Description: + +Bash can leak memory when referencing a non-existent associative array +element. + +Patch (apply with `patch -p0'): + +*** ../bash-5.2-patched/subst.c 2022-11-05 17:27:48.000000000 -0400 +--- subst.c 2022-11-21 14:42:59.000000000 -0500 +*************** +*** 7498,7503 **** + : quote_escapes (temp); + rflags |= W_ARRAYIND; +- if (estatep) +- *estatep = es; /* structure copy */ + } + /* Note that array[*] and array[@] expanded to a quoted null string by +--- 7508,7511 ---- +*************** +*** 7508,7512 **** + rflags |= W_HASQUOTEDNULL; + +! if (estatep == 0) + flush_eltstate (&es); + } +--- 7516,7522 ---- + rflags |= W_HASQUOTEDNULL; + +! if (estatep) +! *estatep = es; /* structure copy */ +! else + flush_eltstate (&es); + } +*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 12 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ Binary files old/bash-5.2-patches/bash52-013.sig and new/bash-5.2-patches/bash52-013.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-014 new/bash-5.2-patches/bash52-014 --- old/bash-5.2-patches/bash52-014 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-5.2-patches/bash52-014 2022-12-13 18:25:31.000000000 +0100 @@ -0,0 +1,119 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.2 +Patch-ID: bash52-014 + +Bug-Reported-by: Andreas Schwab <sch...@suse.de> +Bug-Reference-ID: <mvmv8opcbha....@suse.de> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00076.html + +Bug-Description: + +Bash defers processing additional terminating signals when running the +EXIT trap while exiting due to a terminating signal. This patch allows the +new terminating signal to kill the shell immediately. + +Patch (apply with `patch -p0'): + +*** ../bash-5.2-patched/execute_cmd.c 2022-11-23 17:09:18.000000000 -0500 +--- execute_cmd.c 2022-11-28 10:36:08.000000000 -0500 +*************** +*** 3625,3628 **** +--- 3649,3653 ---- + + dispose_words (es); ++ QUIT; + + if (match) +*** ../bash-5.2-patched/sig.c 2021-11-04 14:15:31.000000000 -0400 +--- sig.c 2022-12-06 09:45:11.000000000 -0500 +*************** +*** 95,98 **** +--- 95,99 ---- + + static void initialize_shell_signals PARAMS((void)); ++ static void kill_shell PARAMS((int)); + + void +*************** +*** 487,490 **** +--- 495,500 ---- + } + ++ static int handling_termsig = 0; ++ + sighandler + termsig_sighandler (sig) +*************** +*** 533,536 **** +--- 543,554 ---- + terminate_immediately = 1; + ++ /* If we are currently handling a terminating signal, we have a couple of ++ choices here. We can ignore this second terminating signal and let the ++ shell exit from the first one, or we can exit immediately by killing ++ the shell with this signal. This code implements the latter; to implement ++ the former, replace the kill_shell(sig) with return. */ ++ if (handling_termsig) ++ kill_shell (sig); /* just short-circuit now */ ++ + terminating_signal = sig; + +*************** +*** 565,572 **** + int sig; + { +- static int handling_termsig = 0; +- int i, core; +- sigset_t mask; +- + /* Simple semaphore to keep this function from being executed multiple + times. Since we no longer are running as a signal handler, we don't +--- 585,588 ---- +*************** +*** 574,578 **** + if (handling_termsig) + return; +! handling_termsig = 1; + terminating_signal = 0; /* keep macro from re-testing true. */ + +--- 590,595 ---- + if (handling_termsig) + return; +! +! handling_termsig = terminating_signal; /* for termsig_sighandler */ + terminating_signal = 0; /* keep macro from re-testing true. */ + +*************** +*** 614,617 **** +--- 631,644 ---- + run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + ++ kill_shell (sig); ++ } ++ ++ static void ++ kill_shell (sig) ++ int sig; ++ { ++ int i, core; ++ sigset_t mask; ++ + /* We don't change the set of blocked signals. If a user starts the shell + with a terminating signal blocked, we won't get here (and if by some +*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ Binary files old/bash-5.2-patches/bash52-014.sig and new/bash-5.2-patches/bash52-014.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-5.2-patches/bash52-015 new/bash-5.2-patches/bash52-015 --- old/bash-5.2-patches/bash52-015 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-5.2-patches/bash52-015 2022-12-13 18:25:45.000000000 +0100 @@ -0,0 +1,216 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.2 +Patch-ID: bash52-015 + +Bug-Reported-by: Frode Nordahl <frode.nord...@canonical.com> +Bug-Reference-ID: <20221119070714.351759-1-frode.nord...@canonical.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00078.html + +Bug-Description: + +There are several cases where bash is too aggressive when optimizing out forks +in subshells. For example, `eval' and traps should never be optimized. + +Patch (apply with `patch -p0'): + +*** ../bash-5.2-patched/builtins/common.h 2022-11-23 17:09:18.000000000 -0500 +--- builtins/common.h 2022-11-19 18:03:59.000000000 -0500 +*************** +*** 52,55 **** +--- 52,56 ---- + #define SEVAL_ONECMD 0x100 /* only allow a single command */ + #define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */ ++ #define SEVAL_NOOPTIMIZE 0x400 /* don't try to set optimization flags */ + + /* Flags for describe_command, shared between type.def and command.def */ +*** ../bash-5.2-patched/builtins/evalstring.c 2022-11-05 17:27:44.000000000 -0400 +--- builtins/evalstring.c 2022-11-19 18:23:21.000000000 -0500 +*************** +*** 133,138 **** + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) && +! ((startup_state == 2 && should_suppress_fork (command->value.Connection->second)) || +! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0)))) + { + command->value.Connection->second->flags |= CMD_NO_FORK; +--- 133,138 ---- + (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && + (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) && +! (should_suppress_fork (command->value.Connection->second) || +! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0)))) + { + command->value.Connection->second->flags |= CMD_NO_FORK; +*************** +*** 291,294 **** +--- 291,295 ---- + (flags & SEVAL_RESETLINE) -> reset line_number to 1 + (flags & SEVAL_NOHISTEXP) -> history_expansion_inhibited -> 1 ++ (flags & SEVAL_NOOPTIMIZE) -> don't try to turn on optimizing flags + */ + +*************** +*** 503,507 **** + series of connection commands is + command->value.Connection->second. */ +! else if (command->type == cm_connection && can_optimize_connection (command)) + { + command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; +--- 504,510 ---- + series of connection commands is + command->value.Connection->second. */ +! else if (command->type == cm_connection && +! (flags & SEVAL_NOOPTIMIZE) == 0 && +! can_optimize_connection (command)) + { + command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; +*** ../bash-5.2-patched/builtins/eval.def 2016-01-25 13:28:37.000000000 -0500 +--- builtins/eval.def 2022-11-19 18:04:25.000000000 -0500 +*************** +*** 54,57 **** + list = loptend; /* skip over possible `--' */ + +! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS); + } +--- 54,57 ---- + list = loptend; /* skip over possible `--' */ + +! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST|SEVAL_NOOPTIMIZE) : EXECUTION_SUCCESS); + } +*** ../bash-5.2-patched/trap.c 2022-08-10 08:59:45.000000000 -0400 +--- trap.c 2022-12-12 10:57:51.000000000 -0500 +*************** +*** 305,308 **** +--- 305,309 ---- + volatile int save_return_catch_flag, function_code; + procenv_t save_return_catch; ++ char *trap_command, *old_trap; + #if defined (ARRAY_VARS) + ARRAY *ps; +*************** +*** 420,423 **** +--- 421,427 ---- + else + { ++ old_trap = trap_list[sig]; ++ trap_command = savestring (old_trap); ++ + save_parser_state (&pstate); + save_subst_varlist = subst_assign_varlist; +*************** +*** 442,446 **** + + if (function_code == 0) +! x = parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE); + else + { +--- 446,451 ---- + + if (function_code == 0) +! /* XXX is x always last_command_exit_value? */ +! x = parse_and_execute (trap_command, "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE); + else + { +*************** +*** 1003,1007 **** + { + reset_parser (); +! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE); + } + else if (code == ERREXIT) +--- 1008,1012 ---- + { + reset_parser (); +! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE); + } + else if (code == ERREXIT) +*************** +*** 1110,1114 **** + } + +! flags = SEVAL_NONINT|SEVAL_NOHIST; + if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP) + flags |= SEVAL_RESETLINE; +--- 1115,1119 ---- + } + +! flags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE; + if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP) + flags |= SEVAL_RESETLINE; +*** ../bash-5.2-patched/parse.y 2022-11-23 17:09:18.000000000 -0500 +--- parse.y 2022-11-19 18:15:34.000000000 -0500 +*************** +*** 2828,2832 **** + last_lastarg = savestring (last_lastarg); + +! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); + + restore_parser_state (&ps); +--- 2844,2848 ---- + last_lastarg = savestring (last_lastarg); + +! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE); + + restore_parser_state (&ps); +*** ../bash-5.2-patched/jobs.c 2022-07-18 10:19:56.000000000 -0400 +--- jobs.c 2022-11-19 18:10:24.000000000 -0500 +*************** +*** 4221,4225 **** + for (i = 0; i < nchild; i++) + { +! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE); + } + +--- 4243,4247 ---- + for (i = 0; i < nchild; i++) + { +! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE); + } + +*** ../bash-5.2-patched/y.tab.c 2022-11-23 17:09:18.000000000 -0500 +--- y.tab.c 2022-11-23 17:21:17.000000000 -0500 +*************** +*** 5139,5143 **** + last_lastarg = savestring (last_lastarg); + +! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); + + restore_parser_state (&ps); +--- 5154,5158 ---- + last_lastarg = savestring (last_lastarg); + +! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE); + + restore_parser_state (&ps); +*** ../bash-5.2-patched/execute_cmd.c 2022-11-05 17:27:41.000000000 -0400 +--- execute_cmd.c 2022-11-22 17:09:38.000000000 -0500 +*************** +*** 1655,1659 **** + and set CMD_TRY_OPTIMIZING for simple commands on the right side of an + and-or or `;' list to test for optimizing forks when they are executed. */ +! if (user_subshell && command->type == cm_subshell) + optimize_subshell_command (command->value.Subshell->command); + +--- 1665,1670 ---- + and set CMD_TRY_OPTIMIZING for simple commands on the right side of an + and-or or `;' list to test for optimizing forks when they are executed. */ +! if (user_subshell && command->type == cm_subshell && +! (command->flags & (CMD_TIME_PIPELINE|CMD_INVERT_RETURN)) == 0) + optimize_subshell_command (command->value.Subshell->command); + +*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 15 + + #endif /* _PATCHLEVEL_H_ */ Binary files old/bash-5.2-patches/bash52-015.sig and new/bash-5.2-patches/bash52-015.sig differ