Debian Bug report logs - #197886
Make 3.80 "*** virtual memory exhausted" fixed in mainline.

version graph

Package: make; Maintainer for make is Manoj Srivastava <srivasta@debian.org>; Source for make is src:make-dfsg.

Reported by: Samium Gromoff <deepfire@ibe.miee.ru>

Date: Wed, 18 Jun 2003 11:18:02 UTC

Severity: normal

Found in version 3.80-1

Fixed in version make/3.80-2

Done: Manoj Srivastava <srivasta@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#197886; Package make. Full text and rfc822 format available.

Acknowledgement sent to Samium Gromoff <deepfire@ibe.miee.ru>:
New Bug report received and forwarded. Copy sent to Manoj Srivastava <srivasta@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Samium Gromoff <deepfire@ibe.miee.ru>
To: submit@bugs.debian.org
Subject: Make 3.80 "*** virtual memory exhausted" fixed in mainline.
Date: Wed, 18 Jun 2003 14:12:31 +0400
Package: make
Version: 3.80-1

Make 3.80 has a bug which is triggered by the following shellscript:
============== 8< ===============
for a in `seq 1 5`; do touch 0123456789012345678901234567890123$a.c; done

cat > Makefile <<'DELIM'
define BUG
SRC := $$(wildcard *.c)
#OBJ := $$(SRC:.c=.o)
OBJ := $$(patsubst %.c,%.o,$$(SRC))

$$(OBJ):%.o:%.c
endef

$(eval $(call BUG))
DELIM

make
============== 8< ===============
strace show that make tries to allocate some negative amount of memory (~4Gbytes),
and this causes a "virtual memory exhausted" message and make abortion.

        I`ve sent a mail to the make maintainer, and i`m attaching
his reply:

From: "Paul D. Smith" <psmith@gnu.org>
To: Samium Gromoff <deepfire@ibe.miee.ru>
Cc: bug-make@gnu.org
Reply-To: "Paul D. Smith" <psmith@gnu.org>
Subject: Re: make 3.80 bug and testcase
Date: Tue, 17 Jun 2003 09:22:22 -0400
Sender: "Paul D. Smith" <psmith@nortelnetworks.com>
Organization: GNU's Not Unix!
X-Mailer: VM 7.16 under Emacs 21.2.1

This is a known bug that has been fixed in the source for a while.  A
patch is available attached to the bug report in Savannah
(http://savannah.gnu.org/projects/make)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

--
regards, Samium Gromoff




-- 



Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#197886; Package make. Full text and rfc822 format available.

Acknowledgement sent to Samium Gromoff <deepfire@ibe.miee.ru>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. Full text and rfc822 format available.

Message #10 received at 197886@bugs.debian.org (full text, mbox):

From: Samium Gromoff <deepfire@ibe.miee.ru>
To: 197886@bugs.debian.org
Subject: a fix from the official make tree
Date: Fri, 4 Jul 2003 10:53:05 +0400
Index: variable.h
===================================================================
RCS file: /cvsroot/make/make/variable.h,v
retrieving revision 1.24
diff -u -B -b -r1.24 variable.h
--- variable.h	8 Aug 2002 00:11:19 -0000	1.24
+++ variable.h	25 Oct 2002 21:37:32 -0000
@@ -107,6 +107,8 @@
 extern char *expand_argument PARAMS ((char *str, char *end));
 extern char *variable_expand_string PARAMS ((char *line, char *string,
                                              long length));
+extern void install_variable_buffer PARAMS ((char **bufp, unsigned int *lenp));
+extern void restore_variable_buffer PARAMS ((char *buf, unsigned int len));
 
 /* function.c */
 extern int handle_function PARAMS ((char **op, char **stringp));
Index: expand.c
===================================================================
RCS file: /cvsroot/make/make/expand.c,v
retrieving revision 1.33
diff -u -B -b -r1.33 expand.c
--- expand.c	14 Oct 2002 21:54:04 -0000	1.33
+++ expand.c	25 Oct 2002 21:37:32 -0000
@@ -545,3 +545,28 @@
 
   return value;
 }
+
+/* Install a new variable_buffer context, returning the current one for
+   safe-keeping.  */
+
+void
+install_variable_buffer (char **bufp, unsigned int *lenp)
+{
+  *bufp = variable_buffer;
+  *lenp = variable_buffer_length;
+
+  variable_buffer = 0;
+  initialize_variable_output ();
+}
+
+/* Restore a previously-saved variable_buffer setting (free the current one).
+ */
+
+void
+restore_variable_buffer (char *buf, unsigned int len)
+{
+  free (variable_buffer);
+
+  variable_buffer = buf;
+  variable_buffer_length = len;
+}
Index: function.c
===================================================================
RCS file: /cvsroot/make/make/function.c,v
retrieving revision 1.71
diff -u -B -b -r1.71 function.c
--- function.c	14 Oct 2002 21:54:04 -0000	1.71
+++ function.c	25 Oct 2002 21:37:32 -0000
@@ -1196,7 +1196,17 @@
 static char *
 func_eval (char *o, char **argv, const char *funcname)
 {
+  char *buf;
+  unsigned int len;
+
+  /* Eval the buffer.  Pop the current variable buffer setting so that the
+     eval'd code can use its own without conflicting.  */
+
+  install_variable_buffer (&buf, &len);
+
   eval_buffer (argv[0]);
+
+  restore_variable_buffer (buf, len);
 
   return o;
 }




Reply sent to Manoj Srivastava <srivasta@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Samium Gromoff <deepfire@ibe.miee.ru>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #15 received at 197886-close@bugs.debian.org (full text, mbox):

From: Manoj Srivastava <srivasta@debian.org>
To: 197886-close@bugs.debian.org
Subject: Bug#197886: fixed in make 3.80-2
Date: Sun, 06 Jul 2003 02:32:20 -0400
We believe that the bug you reported is fixed in the latest version of
make, which is due to be installed in the Debian FTP archive:

make-doc_3.80-2_all.deb
  to pool/main/m/make/make-doc_3.80-2_all.deb
make_3.80-2.diff.gz
  to pool/main/m/make/make_3.80-2.diff.gz
make_3.80-2.dsc
  to pool/main/m/make/make_3.80-2.dsc
make_3.80-2_i386.deb
  to pool/main/m/make/make_3.80-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 197886@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Manoj Srivastava <srivasta@debian.org> (supplier of updated make package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat,  5 Jul 2003 15:38:10 -0500
Source: make
Binary: make-doc make
Architecture: source i386 all
Version: 3.80-2
Distribution: unstable
Urgency: low
Maintainer: Manoj Srivastava <srivasta@debian.org>
Changed-By: Manoj Srivastava <srivasta@debian.org>
Description: 
 make       - The GNU version of the "make" utility.
 make-doc   - Documentation for the GNU version of the "make" utility.
Closes: 197886
Changes: 
 make (3.80-2) unstable; urgency=low
 .
   * "*** virtual memory exhausted" fixed in mainline CVS. Backported
     thanks to Samium Gromoff. The fix involves saving and restoring
     varible buffer contexts around eval'd code.              closes: Bug#197886
Files: 
 d628d43cc2932006cc0978f7274ab03f 623 devel standard make_3.80-2.dsc
 ce440d4eb1fb4bf5c1e211ee9986fe68 21502 devel standard make_3.80-2.diff.gz
 f5e5c267b61dd5834f6a7d75fb55887c 532890 doc optional make-doc_3.80-2_all.deb
 3a79633c834cd280bf3d3be8ae8a60ac 357268 devel standard make_3.80-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/B79PIbrau78kQkwRAnoGAKDyhItYPWmVkGg6EzcExZXdrB6WdgCgr66F
CtNWSEOTOipYaxlmXG6Nmhg=
=ZlL1
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 19:33:25 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.