Author: arekm                        Date: Tue Mar 10 07:54:46 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   bash40-001 (NONE -> 1.1)  (NEW), bash40-002 (NONE -> 1.1)  (NEW), bash40-003 
(NONE -> 1.1)  (NEW), bash40-004 (NONE -> 1.1)  (NEW), bash40-005 (NONE -> 1.1) 
 (NEW), bash40-006 (NONE -> 1.1)  (NEW), bash40-007 (NONE -> 1.1)  (NEW), 
bash40-008 (NONE -> 1.1)  (NEW), bash40-009 (NONE -> 1.1)  (NEW), bash40-010 
(NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/bash40-001
diff -u /dev/null SOURCES/bash40-001:1.1
--- /dev/null   Tue Mar 10 08:54:47 2009
+++ SOURCES/bash40-001  Tue Mar 10 08:54:37 2009
@@ -0,0 +1,162 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-001
+
+Bug-Reported-by:       Mike Frysinger <[email protected]>
+Bug-Reference-ID:      <[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00147.html
+
+Bug-Description:
+
+Bash has problems parsing certain constructs inside Posix-style $(...)
+command substitutions, mostly with backslash-quoting and reserved word
+recognition.    This is an issue because the contents are parsed at the
+time the word containing the command substitution is read.
+
+Patch:
+
+*** ../bash-4.0/parse.y        2009-01-08 08:29:12.000000000 -0500
+--- parse.y    2009-03-06 20:32:35.000000000 -0500
+***************
+*** 2928,2931 ****
+--- 2932,2936 ----
+  #define LEX_HEREDELIM        0x100           /* reading here-doc delimiter */
+  #define LEX_STRIPDOC 0x200           /* <<- strip tabs from here doc delim */
++ #define LEX_INWORD   0x400
+  
+  #define COMSUB_META(ch)              ((ch) == ';' || (ch) == '&' || (ch) == 
'|')
+***************
+*** 3180,3184 ****
+       int *lenp, flags;
+  {
+!   int count, ch, peekc, tflags, lex_rwlen, lex_firstind;
+    int nestlen, ttranslen, start_lineno;
+    char *ret, *nestret, *ttrans, *heredelim;
+--- 3188,3192 ----
+       int *lenp, flags;
+  {
+!   int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind;
+    int nestlen, ttranslen, start_lineno;
+    char *ret, *nestret, *ttrans, *heredelim;
+***************
+*** 3201,3205 ****
+  
+    start_lineno = line_number;
+!   lex_rwlen = 0;
+  
+    heredelim = 0;
+--- 3209,3213 ----
+  
+    start_lineno = line_number;
+!   lex_rwlen = lex_wlen = 0;
+  
+    heredelim = 0;
+***************
+*** 3268,3271 ****
+--- 3276,3319 ----
+       }
+  
++       if (tflags & LEX_PASSNEXT)             /* last char was backslash */
++      {
++ /*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, 
ch, __LINE__);*/
++        tflags &= ~LEX_PASSNEXT;
++        if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. 
*/
++          {
++            if (retind > 0)
++              retind--;       /* swallow previously-added backslash */
++            continue;
++          }
++ 
++        RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
++        if MBTEST(ch == CTLESC || ch == CTLNUL)
++          ret[retind++] = CTLESC;
++        ret[retind++] = ch;
++        continue;
++      }
++ 
++       /* If this is a shell break character, we are not in a word.  If not,
++       we either start or continue a word. */
++       if MBTEST(shellbreak (ch))
++      {
++        tflags &= ~LEX_INWORD;
++ /*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, 
__LINE__);*/
++      }
++       else
++      {
++        if (tflags & LEX_INWORD)
++          {
++            lex_wlen++;
++ /*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", 
line_number, ch, lex_wlen, __LINE__);*/
++          }         
++        else
++          {
++ /*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, 
__LINE__);*/
++            tflags |= LEX_INWORD;
++            lex_wlen = 0;
++          }
++      }
++ 
+        /* Skip whitespace */
+        if MBTEST(shellblank (ch) && lex_rwlen == 0)
+***************
+*** 3400,3428 ****
+           }
+         else
+!          ch = peekc;         /* fall through and continue XXX - this skips 
comments if peekc == '#' */
+       }
+!       /* Not exactly right yet, should handle shell metacharacters, too.  If
+!       any changes are made to this test, make analogous changes to subst.c:
+!       extract_delimited_string(). */
+!       else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 
0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank 
(ret[retind - 1])))
+       tflags |= LEX_INCOMMENT;
+  
+!       if (tflags & LEX_PASSNEXT)             /* last char was backslash */
+!      {
+!        tflags &= ~LEX_PASSNEXT;
+!        if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. 
*/
+!          {
+!            if (retind > 0)
+!              retind--;       /* swallow previously-added backslash */
+!            continue;
+!          }
+! 
+!        RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+!        if MBTEST(ch == CTLESC || ch == CTLNUL)
+!          ret[retind++] = CTLESC;
+!        ret[retind++] = ch;
+!        continue;
+!      }
+!       else if MBTEST(ch == CTLESC || ch == CTLNUL)   /* special shell 
escapes */
+       {
+         RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+--- 3442,3454 ----
+           }
+         else
+!          ch = peekc;         /* fall through and continue XXX */
+       }
+!       else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 
0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & 
LEX_INWORD) && lex_wlen == 0)))
+! {
+! /*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, 
__LINE__);*/
+       tflags |= LEX_INCOMMENT;
++ }
+  
+!       if MBTEST(ch == CTLESC || ch == CTLNUL)        /* special shell 
escapes */
+       {
+         RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+*** ../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 0
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 1
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-002
diff -u /dev/null SOURCES/bash40-002:1.1
--- /dev/null   Tue Mar 10 08:54:48 2009
+++ SOURCES/bash40-002  Tue Mar 10 08:54:37 2009
@@ -0,0 +1,43 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-002
+
+Bug-Reported-by:       [email protected]
+Bug-Reference-ID:      <[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00142.html
+
+Bug-Description:
+
+A line inadvertenly omitted from a submitted patch results in core dumps
+when attempting filename completion while using the bash-completion
+package.
+
+Patch:
+
+*** ../bash-4.0/pcomplete.c    2009-02-01 17:12:31.000000000 -0500
+--- pcomplete.c        2009-02-22 17:08:25.000000000 -0500
+***************
+*** 1033,1036 ****
+--- 1033,1037 ----
+  
+    pps = &ps;
++   save_parser_state (pps);
+    begin_unwind_frame ("gen-shell-function-matches");
+    add_unwind_protect (restore_parser_state, (char *)pps);
+*** ../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 1
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 2
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-003
diff -u /dev/null SOURCES/bash40-003:1.1
--- /dev/null   Tue Mar 10 08:54:49 2009
+++ SOURCES/bash40-003  Tue Mar 10 08:54:38 2009
@@ -0,0 +1,70 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-003
+
+Bug-Reported-by:       Bernd Eggink <[email protected]>
+Bug-Reference-ID:      <[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00177.html
+
+Bug-Description:
+
+Under certain circumstances, constructs containing command substitutions
+prevent PS1 from being re-evaluated and updated before being displayed.
+
+Patch:
+
+*** ../bash-4.0/parse.y        2009-01-08 08:29:12.000000000 -0500
+--- parse.y    2009-02-25 15:58:25.000000000 -0500
+***************
+*** 1616,1623 ****
+    int *ret;
+  
+!   ret = (int *)xmalloc (3 * sizeof (int));
+    ret[0] = last_read_token;
+    ret[1] = token_before_that;
+    ret[2] = two_tokens_ago;
+    return ret;
+  }
+--- 1616,1624 ----
+    int *ret;
+  
+!   ret = (int *)xmalloc (4 * sizeof (int));
+    ret[0] = last_read_token;
+    ret[1] = token_before_that;
+    ret[2] = two_tokens_ago;
++   ret[3] = current_token;
+    return ret;
+  }
+***************
+*** 1632,1635 ****
+--- 1633,1637 ----
+    token_before_that = ts[1];
+    two_tokens_ago = ts[2];
++   current_token = ts[3];
+  }
+  
+***************
+*** 2669,2672 ****
+--- 2671,2675 ----
+    word_desc_to_read = (WORD_DESC *)NULL;
+  
++   current_token = '\n';              /* XXX */
+    last_read_token = '\n';
+    token_to_read = '\n';
+*** ../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 2
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 3
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-004
diff -u /dev/null SOURCES/bash40-004:1.1
--- /dev/null   Tue Mar 10 08:54:50 2009
+++ SOURCES/bash40-004  Tue Mar 10 08:54:38 2009
@@ -0,0 +1,47 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-004
+
+Bug-Reported-by:       Mike Frysinger <[email protected]>
+Bug-Reference-ID:      <[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00176.html
+
+Bug-Description:
+
+In some cases, enabling the `checkjobs' shell option will cause the shell
+to core dump when executing the `exit' builtin.
+
+Patch:
+
+*** ../bash-4.0/builtins/exit.def      2009-01-04 14:32:22.000000000 -0500
+--- builtins/exit.def  2009-02-23 22:56:58.000000000 -0500
+***************
+*** 114,118 ****
+       if (jobs[i] && STOPPED (i))
+         stopmsg = JSTOPPED;
+!      else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
+         stopmsg = JRUNNING;
+  
+--- 114,118 ----
+       if (jobs[i] && STOPPED (i))
+         stopmsg = JSTOPPED;
+!      else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
+         stopmsg = JRUNNING;
+  
+*** ../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 3
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 4
+  
+  #endif /* _PATCHLEVEL_H_ */

================================================================
Index: SOURCES/bash40-005
diff -u /dev/null SOURCES/bash40-005:1.1
--- /dev/null   Tue Mar 10 08:54:50 2009
+++ SOURCES/bash40-005  Tue Mar 10 08:54:38 2009
@@ -0,0 +1,63 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-005
+
+Bug-Reported-by:       Pierre Gaston <[email protected]>
+Bug-Reference-ID:      
<[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00206.html
+
+Bug-Description:
+
+The `declare' builtin dumped core when attempting to assign associative
+array indices containing some special characters, even when they were
+quoted before being expanded.
+
+Patch:
+
+*** ../bash-4.0/builtins/declare.def   2009-01-04 14:32:22.000000000 -0500
+--- builtins/declare.def       2009-02-26 11:40:16.000000000 -0500
+***************
+*** 296,299 ****
+--- 296,306 ----
+        if (t = strchr (name, '['))    /* ] */
+       {
++        /* If offset != 0 we have already validated any array reference */
++        if (offset == 0 && valid_array_reference (name) == 0)
++          {
++            sh_invalidid (name);
++            assign_error++;
++            NEXT_VARIABLE ();
++          }
+         subscript_start = t;
+         *t = '\0';
+***************
+*** 485,489 ****
+         /* declare -a name[[n]] or declare name[n] makes name an indexed
+            array variable. */
+!        else if ((making_array_special || (flags_on & att_array)) && array_p 
(var) == 0)
+           var = convert_var_to_array (var);
+  #endif /* ARRAY_VARS */
+--- 492,496 ----
+         /* declare -a name[[n]] or declare name[n] makes name an indexed
+            array variable. */
+!        else if ((making_array_special || (flags_on & att_array)) && array_p 
(var) == 0 && assoc_p (var) == 0)
+           var = convert_var_to_array (var);
+  #endif /* ARRAY_VARS */
+*** ../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 4
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 5
+  
+  #endif /* _PATCHLEVEL_H_ */
+

================================================================
Index: SOURCES/bash40-006
diff -u /dev/null SOURCES/bash40-006:1.1
--- /dev/null   Tue Mar 10 08:54:51 2009
+++ SOURCES/bash40-006  Tue Mar 10 08:54:39 2009
@@ -0,0 +1,43 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-006
+
+Bug-Reported-by:       Evgeniy Zhemchugov <[email protected]>
+Bug-Reference-ID:      
<[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00202.html
+
+Bug-Description:
+
+Bash did not parse pipelines using the |& construct correctly if the
+pipeline elements were not simple commands.
+
+Patch:
+
+*** ../bash-4.0/parse.y        2009-01-08 08:29:12.000000000 -0500
+--- parse.y    2009-02-25 17:25:56.000000000 -0500
+***************
+*** 4478,4481 ****
+--- 4478,4482 ----
+      case AND_AND:
+      case BANG:
++     case BAR_AND:
+      case DO:
+      case DONE:
+*** ../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 5
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 6
+  
+  #endif /* _PATCHLEVEL_H_ */
+

================================================================
Index: SOURCES/bash40-007
diff -u /dev/null SOURCES/bash40-007:1.1
--- /dev/null   Tue Mar 10 08:54:51 2009
+++ SOURCES/bash40-007  Tue Mar 10 08:54:39 2009
@@ -0,0 +1,263 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release: 4.0
+Patch-ID: bash40-007
+
+Bug-Reported-by:       AnMaster <[email protected]>
+Bug-Reference-ID:      <[email protected]>
+Bug-Reference-URL:     
http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00188.html
+
+Bug-Description:
+
+Bash had a number of problems parsing associative array subscripts containing
+special characters.  The subscripts are supposed to be read as if they are
+enclosed between double quotes.
+
+Patch:
+
+*** ../bash-4.0/parse.y        2009-01-08 08:29:12.000000000 -0500
+--- parse.y    2009-02-25 17:25:56.000000000 -0500
+***************
+*** 2919,2922 ****
+--- 2919,2923 ----
+  #define P_COMMAND    0x08    /* parsing a command, so look for comments */
+  #define P_BACKQUOTE  0x10    /* parsing a backquoted command substitution */
++ #define P_ARRAYSUB   0x20    /* parsing a [...] array subscript for 
assignment */
+  
+  /* Lexical state while parsing a grouping construct or $(...). */
+***************
+*** 3134,3137 ****
+--- 3134,3139 ----
+             FREE (nestret);
+           }
++        else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' 
|| ch == '{' || ch == '['))      /* ) } ] */
++          goto parse_dollar_word;
+       }
+        /* Parse an old-style command substitution within double quotes as a
+***************
+*** 3150,3153 ****
+--- 3150,3154 ----
+       /* check for $(), $[], or ${} inside quoted string. */
+       {
++ parse_dollar_word:
+         if (open == ch)       /* undo previous increment */
+           count--;
+***************
+*** 4277,4281 ****
+                     (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+          {
+!        ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+         if (ttok == &matched_pair_error)
+           return -1;          /* Bail immediately. */
+--- 4277,4281 ----
+                     (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+          {
+!        ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
+         if (ttok == &matched_pair_error)
+           return -1;          /* Bail immediately. */
+*** ../bash-4.0/arrayfunc.c    2009-01-04 14:32:21.000000000 -0500
+--- arrayfunc.c        2009-02-25 07:58:54.000000000 -0500
+***************
+*** 605,666 ****
+  }
+  
+! /* This function assumes s[i] == '['; returns with s[ret] == ']' if
+!    an array subscript is correctly parsed. */
+! int
+! skipsubscript (s, i)
+!      const char *s;
+!      int i;
+! {
+!   int count, c;
+! #if defined (HANDLE_MULTIBYTE)
+!   mbstate_t state, state_bak;
+!   size_t slength, mblength;
+! #endif
+! 
+! #if defined (HANDLE_MULTIBYTE)
+!   memset (&state, '\0', sizeof (mbstate_t));
+!   slength = strlen (s + i);
+! #endif
+!   
+!   count = 1;
+!   while (count)
+!     {
+!       /* Advance one (possibly multibyte) character in S starting at I. */
+! #if defined (HANDLE_MULTIBYTE)
+!       if (MB_CUR_MAX > 1)
+!      {
+!        state_bak = state;
+!        mblength = mbrlen (s + i, slength, &state);
+! 
+!        if (MB_INVALIDCH (mblength))
+!          {
+!            state = state_bak;
+!            i++;
+!            slength--;
+!          }
+!        else if (MB_NULLWCH (mblength))
+!          return i;
+!        else
+!          {
+!            i += mblength;
+!            slength -= mblength;
+!          }
+!      }
+!       else
+! #endif
+!       ++i;
+! 
+!       c = s[i];
+! 
+!       if (c == 0)
+!      break;
+!       else if (c == '[')
+!      count++;
+!       else if (c == ']')
+!      count--;
+!     }
+! 
+!   return i;
+! }
+  
+  /* This function is called with SUB pointing to just after the beginning
+--- 605,609 ----
+  }
+  
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to