bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash keeps too much data in memory


From: Wojciech Puchar
Subject: Re: bash keeps too much data in memory
Date: Thu, 13 Mar 2008 22:50:19 +0100 (CET)

works fine! , but patch didn't (1 hunk of 3 failed).

i patched it manually (bash-3.2.tar.gz with all patches from ftp.gnu.org) and compiled.

bug is fixed. thanks

the working patch below.

if you'll put this patch on ftp or not, both please tell me and the name, i will add the fix to FreeBSD ports.


--- builtins/read.def.orig      Thu Mar 13 22:26:42 2008
+++ builtins/read.def   Thu Mar 13 22:41:25 2008
@@ -134,7 +134,7 @@
   intmax_t intval;
   char c;
   char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
-  char *e, *t, *t1, *ps2;
+  char *e, *t, *t1, *t2, *ps2;
   struct stat tsb;
   SHELL_VAR *var;
 #if defined (ARRAY_VARS)
@@ -677,9 +677,9 @@
   if (*input_string)
     {
       t1 = input_string;
-      t = get_word_from_string (&input_string, ifs_chars, &e);
+      t2 = get_word_from_string (&input_string, ifs_chars, &e);
       if (*input_string == 0)
-       input_string = t;
+       input_string = t2;
       else
        input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, 
saw_escape);
     }
@@ -696,6 +696,7 @@
   stupidly_hack_special_variables (list->word->word);
   if (var)
     VUNSETATTR (var, att_invisible);
+  FREE (t2);
   xfree (orig_input_string);

   return (retval);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]