SOURCES: bash40-011 (NEW), bash40-012 (NEW), bash40-013 (NEW), bash40-014 (...

arekm arekm at pld-linux.org
Mon Apr 6 22:46:44 CEST 2009


Author: arekm                        Date: Mon Apr  6 20:46:43 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   bash40-011 (NONE -> 1.1)  (NEW), bash40-012 (NONE -> 1.1)  (NEW), bash40-013 (NONE -> 1.1)  (NEW), bash40-014 (NONE -> 1.1)  (NEW), bash40-015 (NONE -> 1.1)  (NEW), bash40-016 (NONE -> 1.1)  (NEW), bash40-017 (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/bash40-011
diff -u /dev/null SOURCES/bash40-011:1.1
--- /dev/null	Mon Apr  6 22:46:44 2009
+++ SOURCES/bash40-011	Mon Apr  6 22:46:36 2009
@@ -0,0 +1,49 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-011
+
+Bug-Reported-by:	Matt Zyzik <Matt at ice.filescope.com>n
+Bug-Reference-ID:	<20090312015018.C00741383ED at ice.filescope.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00092.html
+
+Bug-Description:
+
+When using the new |& operator following a simple command with a redirection,
+the redirection of stderr through the pipe was not performed under certain
+circumstances.
+
+Patch:
+
+*** ../bash-4.0-patched/parse.y	2009-03-08 21:24:47.000000000 -0400
+--- parse.y	2009-03-12 21:36:23.000000000 -0400
+***************
+*** 1123,1127 ****
+  			  REDIRECT *r;
+  
+! 			  tc = $1;
+  			  rd.dest = 1;
+  			  r = make_redirection (2, r_duplicating_output, rd);
+--- 1123,1127 ----
+  			  REDIRECT *r;
+  
+! 			  tc = $1->type == cm_simple ? (COMMAND *)$1->value.Simple : $1;
+  			  rd.dest = 1;
+  			  r = make_redirection (2, r_duplicating_output, rd);
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 10
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 11
+  
+  #endif /* _PATCHLEVEL_H_ */
+

================================================================
Index: SOURCES/bash40-012
diff -u /dev/null SOURCES/bash40-012:1.1
--- /dev/null	Mon Apr  6 22:46:45 2009
+++ SOURCES/bash40-012	Mon Apr  6 22:46:36 2009
@@ -0,0 +1,47 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-012
+
+Bug-Reported-by:	"Clark J. Wang" <dearvoid at gmail.com>
+Bug-Reference-ID:	<a96f63770903132300v7816dfb7hb7f48d46048bf3cb at mail.gmail.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00129.html
+
+Bug-Description:
+
+A case statement using the ;& pattern terminator followed immediately by
+"esac" caused a core dump due to a null pointer dereference.
+
+Patch:
+
+*** ../bash-4.0-patched/execute_cmd.c	2009-02-13 16:41:41.000000000 -0500
+--- execute_cmd.c	2009-03-14 13:23:00.000000000 -0400
+***************
+*** 2931,2935 ****
+  		}
+  	      while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
+! 	      if ((clauses->flags & CASEPAT_TESTNEXT) == 0)
+  		EXIT_CASE ();
+  	      else
+--- 2931,2935 ----
+  		}
+  	      while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
+! 	      if (clauses == 0 || (clauses->flags & CASEPAT_TESTNEXT) == 0)
+  		EXIT_CASE ();
+  	      else
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 11
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 12
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-013
diff -u /dev/null SOURCES/bash40-013:1.1
--- /dev/null	Mon Apr  6 22:46:45 2009
+++ SOURCES/bash40-013	Mon Apr  6 22:46:36 2009
@@ -0,0 +1,153 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-013
+
+Bug-Reported-by:	jidanni at jidanni.org
+Bug-Reference-ID:
+Bug-Reference-URL:	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519165
+
+Bug-Description:
+
+Though references to $@ when there are no positional parameters will now
+cause the shell to exit if the `errexit' option has been enabled, constructs
+such as ${@:-foo} should not cause an exit.
+
+Patch:
+
+*** ../bash-4.0-patched/subst.c	2009-03-08 21:24:39.000000000 -0400
+--- subst.c	2009-03-14 19:04:10.000000000 -0400
+***************
+*** 86,89 ****
+--- 86,90 ----
+  /* Flags for the `pflags' argument to param_expand() */
+  #define PF_NOCOMSUB	0x01	/* Do not perform command substitution */
++ #define PF_IGNUNBOUND	0x02	/* ignore unbound vars even if -u set */
+  
+  /* These defs make it easier to use the editor. */
+***************
+*** 264,268 ****
+  static int chk_arithsub __P((const char *, int));
+  
+! static WORD_DESC *parameter_brace_expand_word __P((char *, int, int));
+  static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
+  static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
+--- 265,269 ----
+  static int chk_arithsub __P((const char *, int));
+  
+! static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int));
+  static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
+  static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
+***************
+*** 5196,5202 ****
+     NAME was found inside of a double-quoted expression. */
+  static WORD_DESC *
+! parameter_brace_expand_word (name, var_is_special, quoted)
+       char *name;
+!      int var_is_special, quoted;
+  {
+    WORD_DESC *ret;
+--- 5197,5203 ----
+     NAME was found inside of a double-quoted expression. */
+  static WORD_DESC *
+! parameter_brace_expand_word (name, var_is_special, quoted, pflags)
+       char *name;
+!      int var_is_special, quoted, pflags;
+  {
+    WORD_DESC *ret;
+***************
+*** 5230,5234 ****
+  
+        ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
+! 			  (int *)NULL, (int *)NULL, 0);
+        free (tt);
+      }
+--- 5231,5235 ----
+  
+        ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
+! 			  (int *)NULL, (int *)NULL, pflags);
+        free (tt);
+      }
+***************
+*** 5291,5295 ****
+    WORD_DESC *w;
+  
+!   w = parameter_brace_expand_word (name, var_is_special, quoted);
+    t = w->word;
+    /* Have to dequote here if necessary */
+--- 5292,5296 ----
+    WORD_DESC *w;
+  
+!   w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
+    t = w->word;
+    /* Have to dequote here if necessary */
+***************
+*** 5308,5312 ****
+      return (WORD_DESC *)NULL;
+  
+!   w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted);
+    free (t);
+  
+--- 5309,5313 ----
+      return (WORD_DESC *)NULL;
+  
+!   w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0);
+    free (t);
+  
+***************
+*** 6659,6663 ****
+      tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+    else
+!     tdesc = parameter_brace_expand_word (name, var_is_special, quoted);
+  
+    if (tdesc)
+--- 6660,6664 ----
+      tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+    else
+!     tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
+  
+    if (tdesc)
+***************
+*** 6990,6994 ****
+        list = list_rest_of_args ();
+  
+!       if (list == 0 && unbound_vars_is_error)
+  	{
+  	  uerror[0] = '$';
+--- 6991,6995 ----
+        list = list_rest_of_args ();
+  
+!       if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+  	{
+  	  uerror[0] = '$';
+***************
+*** 7052,7056 ****
+        list = list_rest_of_args ();
+  
+!       if (list == 0 && unbound_vars_is_error)
+  	{
+  	  uerror[0] = '$';
+--- 7053,7057 ----
+        list = list_rest_of_args ();
+  
+!       if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+  	{
+  	  uerror[0] = '$';
+
+
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 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_ */

================================================================
Index: SOURCES/bash40-014
diff -u /dev/null SOURCES/bash40-014:1.1
--- /dev/null	Mon Apr  6 22:46:46 2009
+++ SOURCES/bash40-014	Mon Apr  6 22:46:37 2009
@@ -0,0 +1,113 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-014
+
+Bug-Reported-by:	smallnow at gmail.com
+Bug-Reference-ID:	<49C460FE.40307 at gmail.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00166.html
+
+Bug-Description:
+
+When the fc builtin is run in a command substitution from a shell with history
+enabled, it does not correctly calculate the command on which to operate.
+
+Patch:
+
+*** ../bash-4.0-patched/builtins/fc.def	2009-01-04 14:32:22.000000000 -0500
+--- builtins/fc.def	2009-03-21 14:03:43.000000000 -0400
+***************
+*** 89,92 ****
+--- 89,93 ----
+  extern int literal_history;
+  extern int posixly_correct;
++ extern int subshell_environment, interactive_shell;
+  
+  extern int unlink __P((const char *));
+***************
+*** 173,177 ****
+    register char *sep;
+    int numbering, reverse, listing, execute;
+!   int histbeg, histend, last_hist, retval, opt;
+    FILE *stream;
+    REPL *rlist, *rl;
+--- 174,178 ----
+    register char *sep;
+    int numbering, reverse, listing, execute;
+!   int histbeg, histend, last_hist, retval, opt, rh;
+    FILE *stream;
+    REPL *rlist, *rl;
+***************
+*** 276,279 ****
+--- 277,282 ----
+        fprintf (stderr, "%s\n", command);
+        fc_replhist (command);	/* replace `fc -s' with command */
++       /* Posix says that the re-executed commands should be entered into the
++ 	 history. */
+        return (parse_and_execute (command, "fc", SEVAL_NOHIST));
+      }
+***************
+*** 294,298 ****
+       so we check hist_last_line_added. */
+  
+!   last_hist = i - remember_on_history - hist_last_line_added;
+  
+    if (list)
+--- 297,306 ----
+       so we check hist_last_line_added. */
+  
+!   /* Even though command substitution through parse_and_execute turns off
+!      remember_on_history, command substitution in a shell when set -o history
+!      has been enabled (interactive or not) should use it in the last_hist
+!      calculation as if it were on. */
+!   rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+!   last_hist = i - rh - hist_last_line_added;
+  
+    if (list)
+***************
+*** 457,461 ****
+       HIST_ENTRY **hlist;
+  {
+!   int sign, n, clen;
+    register int i, j;
+    register char *s;
+--- 465,469 ----
+       HIST_ENTRY **hlist;
+  {
+!   int sign, n, clen, rh;
+    register int i, j;
+    register char *s;
+***************
+*** 473,477 ****
+       so we check hist_last_line_added.  This needs to agree with the
+       calculation of last_hist in fc_builtin above. */
+!   i -= remember_on_history + hist_last_line_added;
+  
+    /* No specification defaults to most recent command. */
+--- 481,490 ----
+       so we check hist_last_line_added.  This needs to agree with the
+       calculation of last_hist in fc_builtin above. */
+!   /* Even though command substitution through parse_and_execute turns off
+!      remember_on_history, command substitution in a shell when set -o history
+!      has been enabled (interactive or not) should use it in the last_hist
+!      calculation as if it were on. */
+!   rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+!   i -= rh + hist_last_line_added;
+  
+    /* No specification defaults to most recent command. */
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 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_ */

================================================================
Index: SOURCES/bash40-015
diff -u /dev/null SOURCES/bash40-015:1.1
--- /dev/null	Mon Apr  6 22:46:46 2009
+++ SOURCES/bash40-015	Mon Apr  6 22:46:37 2009
@@ -0,0 +1,84 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-015
+
+Bug-Reported-by:	Lubomir Rintel <lkundrak at v3.sk>
+Bug-Reference-ID:	<1237654931.32737.13.camel at localhost.localdomain>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00174.html
+
+Bug-Description:
+
+Deferring handling of signals which should cause the shell to terminate until
+it is "safe" to run the handler functions does not work for some terminating
+signals.
+
+Patch:
+
+*** ../bash-4.0-patched/sig.c	2009-01-04 14:32:41.000000000 -0500
+--- sig.c	2009-03-22 14:47:56.000000000 -0400
+***************
+*** 449,452 ****
+--- 449,494 ----
+       int sig;
+  {
++   /* If we get called twice with the same signal before handling it,
++      terminate right away. */
++   if (
++ #ifdef SIGHUP
++     sig != SIGHUP &&
++ #endif
++ #ifdef SIGINT
++     sig != SIGINT &&
++ #endif
++ #ifdef SIGDANGER
++     sig != SIGDANGER &&
++ #endif
++ #ifdef SIGPIPE
++     sig != SIGPIPE &&
++ #endif
++ #ifdef SIGALRM
++     sig != SIGALRM &&
++ #endif
++ #ifdef SIGTERM
++     sig != SIGTERM &&
++ #endif
++ #ifdef SIGXCPU
++     sig != SIGXCPU &&
++ #endif
++ #ifdef SIGXFSZ
++     sig != SIGXFSZ &&
++ #endif
++ #ifdef SIGVTALRM
++     sig != SIGVTALRM &&
++ #endif
++ #ifdef SIGLOST
++     sig != SIGLOST &&
++ #endif
++ #ifdef SIGUSR1
++     sig != SIGUSR1 &&
++ #endif
++ #ifdef SIGUSR2
++    sig != SIGUSR2 &&
++ #endif
++    sig == terminating_signal)
++     terminate_immediately = 1;
++ 
+    terminating_signal = sig;
+  
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 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_ */

================================================================
Index: SOURCES/bash40-016
diff -u /dev/null SOURCES/bash40-016:1.1
--- /dev/null	Mon Apr  6 22:46:47 2009
+++ SOURCES/bash40-016	Mon Apr  6 22:46:38 2009
@@ -0,0 +1,104 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-016
+
+Bug-Reported-by:	Brian J. Murrell" <brian at interlinx.bc.ca>
+Bug-Reference-ID:	<1237564627.7666.12.camel at pc.interlinx.bc.ca>
+Bug-Reference-URL:http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00160.html
+
+Bug-Description:
+
+There are several problems with the handling of $LINENO in an ERR trap.
+
+Patch:
+
+*** ../bash-4.0-patched/trap.c	2009-01-16 17:07:53.000000000 -0500
+--- trap.c	2009-03-20 21:37:00.000000000 -0400
+***************
+*** 756,760 ****
+  
+        flags = SEVAL_NONINT|SEVAL_NOHIST;
+!       if (sig != DEBUG_TRAP && sig != RETURN_TRAP)
+  	flags |= SEVAL_RESETLINE;
+        if (function_code == 0)
+--- 756,760 ----
+  
+        flags = SEVAL_NONINT|SEVAL_NOHIST;
+!       if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
+  	flags |= SEVAL_RESETLINE;
+        if (function_code == 0)
+*** ../bash-4.0-patched/execute_cmd.c	2009-02-13 16:41:41.000000000 -0500
+--- execute_cmd.c	2009-03-21 14:16:11.000000000 -0400
+***************
+*** 569,572 ****
+--- 569,573 ----
+        /* Fork a subshell, turn off the subshell bit, turn off job
+  	 control and call execute_command () on the command again. */
++       line_number_for_err_trap = line_number;
+        paren_pid = make_child (savestring (make_command_string (command)),
+  			      asynchronous);
+***************
+*** 611,615 ****
+--- 612,619 ----
+  		{
+  		  last_command_exit_value = exec_result;
++ 		  save_line_number = line_number;
++ 		  line_number = line_number_for_err_trap;
+  		  run_error_trap ();
++ 		  line_number = save_line_number;
+  		}
+  
+***************
+*** 767,771 ****
+--- 771,777 ----
+  	{
+  	  last_command_exit_value = exec_result;
++ 	  line_number = line_number_for_err_trap;
+  	  run_error_trap ();
++ 	  line_number = save_line_number;
+  	}
+  
+***************
+*** 2106,2109 ****
+--- 2112,2116 ----
+    COMMAND *tc, *second;
+    int ignore_return, exec_result, was_error_trap, invert;
++   volatile int save_line_number;
+  
+    ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+***************
+*** 2175,2178 ****
+--- 2182,2186 ----
+        ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+  
++       line_number_for_err_trap = line_number;
+        exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close);
+  
+***************
+*** 2180,2184 ****
+--- 2188,2195 ----
+  	{
+  	  last_command_exit_value = exec_result;
++ 	  save_line_number = line_number;
++ 	  line_number = line_number_for_err_trap;
+  	  run_error_trap ();
++ 	  line_number = save_line_number;
+  	}
+  
+*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
+--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 15
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 16
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-017
diff -u /dev/null SOURCES/bash40-017:1.1
--- /dev/null	Mon Apr  6 22:46:48 2009
+++ SOURCES/bash40-017	Mon Apr  6 22:46:38 2009
@@ -0,0 +1,47 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.0
+Patch-ID:	bash40-017
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list