Debian Bug report logs - #92629
m4: [hurd] loses data from swapped-out diversions

version graph

Package: m4; Maintainer for m4 is Santiago Vila <sanvila@debian.org>; Source for m4 is src:m4.

Reported by: Robert Bihlmeyer <robbe@orcus.priv.at>

Date: Mon, 2 Apr 2001 22:03:33 UTC

Severity: important

Tags: patch

Merged with 53052

Found in version 1.4-12

Fixed in version m4/1.4-13

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Rene Seindal <rene@seindal.dk>

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#92629; Package m4. Full text and rfc822 format available.

Acknowledgement sent to Robert Bihlmeyer <robbe@orcus.priv.at>:
New Bug report received and forwarded. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

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

From: Robert Bihlmeyer <robbe@orcus.priv.at>
To: submit@bugs.debian.org
Subject: m4: [hurd] loses data from swapped-out diversions
Date: Mon, 2 Apr 2001 23:20:39 +0200 (CEST)
Package: m4
Version: 1.4-12
Severity: important

[Important because it affects a good portion of configure.in scripts.
This impedes development of other packages on the Hurd.]

When the combined size of diversions raises over a certain threshold,
m4 swaps some of them out to temporary files (a somewhat archaic
mechanism, I might say). Upon reading them back in it uses a dirty
construct (mixing buffed and unbuffered I/O without precautions) which
breaks on the Hurd.

The appended patch replaces the unbuffered with a buffered I/O call,
fixing the problem.

--- m4-1.4-/src/output.c	Fri Sep  2 08:27:40 1994
+++ m4-1.4/src/output.c	Mon Apr  2 23:04:08 2001
@@ -467,12 +467,12 @@
 
   /* Insert output by big chunks.  */
 
-  while (length = read (fileno (file), buffer, COPY_BUFFER_SIZE),
+  errno = 0;
+  while (length = fread (buffer, 1, COPY_BUFFER_SIZE, file),
 	 length != 0)
-    if (length == (size_t) -1)
-      M4ERROR ((EXIT_FAILURE, errno, "ERROR: Reading inserted file"));
-    else
-      output_text (buffer, length);
+    output_text (buffer, length);
+  if (errno)
+    M4ERROR ((EXIT_FAILURE, errno, "ERROR: Reading inserted file"));
 }
 
 /*-------------------------------------------------------------------------.


-- System Information
Debian Release: testing/unstable
Kernel Version: Linux hoss 2.4.2-int-hoss #3 Tue Mar 6 17:44:00 CET 2001 i686 unknown

Versions of the packages m4 depends on:
ii  libc6          2.2.2-4        GNU C Library: Shared libraries and Timezone



Merged 53052 92629. Request was from Robert Bihlmeyer <robbe@orcus.priv.at> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: patch Request was from Robert Bihlmeyer <robbe@orcus.priv.at> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. Full text and rfc822 format available.

Message #12 received at 92629-forwarded@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Rene Seindal <rene@seindal.dk>
Cc: <92629-forwarded@bugs.debian.org>, Robert Bihlmeyer <robbe@orcus.priv.at>
Subject: Bug#92629: m4: [hurd] loses data from swapped-out diversions (fwd)
Date: Tue, 3 Apr 2001 15:11:51 +0200 (CEST)
Hello.

I received this from the Debian Bug System.
Is it expected a new m4 release sometime soon?

---------- Forwarded message ----------
Date: Mon,  2 Apr 2001 23:20:39 +0200 (CEST)
From: Robert Bihlmeyer <robbe@orcus.priv.at>
To: submit@bugs.debian.org
Subject: #92629: m4: [hurd] loses data from swapped-out diversions

Package: m4
Version: 1.4-12
Severity: important

[Important because it affects a good portion of configure.in scripts.
This impedes development of other packages on the Hurd.]

When the combined size of diversions raises over a certain threshold,
m4 swaps some of them out to temporary files (a somewhat archaic
mechanism, I might say). Upon reading them back in it uses a dirty
construct (mixing buffed and unbuffered I/O without precautions) which
breaks on the Hurd.

The appended patch replaces the unbuffered with a buffered I/O call,
fixing the problem.

--- m4-1.4-/src/output.c	Fri Sep  2 08:27:40 1994
+++ m4-1.4/src/output.c	Mon Apr  2 23:04:08 2001
@@ -467,12 +467,12 @@

   /* Insert output by big chunks.  */

-  while (length = read (fileno (file), buffer, COPY_BUFFER_SIZE),
+  errno = 0;
+  while (length = fread (buffer, 1, COPY_BUFFER_SIZE, file),
 	 length != 0)
-    if (length == (size_t) -1)
-      M4ERROR ((EXIT_FAILURE, errno, "ERROR: Reading inserted file"));
-    else
-      output_text (buffer, length);
+    output_text (buffer, length);
+  if (errno)
+    M4ERROR ((EXIT_FAILURE, errno, "ERROR: Reading inserted file"));
 }

 /*-------------------------------------------------------------------------.


-- System Information
Debian Release: testing/unstable
Kernel Version: Linux hoss 2.4.2-int-hoss #3 Tue Mar 6 17:44:00 CET 2001 i686 unknown

Versions of the packages m4 depends on:
ii  libc6          2.2.2-4        GNU C Library: Shared libraries and Timezone




Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Robert Bihlmeyer <robbe@orcus.priv.at>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Santiago Vila <sanvila@debian.org>
To: 53052-close@bugs.debian.org
Subject: Bug#53052: fixed in m4 1.4-13
Date: Wed, 04 Apr 2001 15:02:03 -0400
We believe that the bug you reported is fixed in the latest version of
m4, which has been installed in the Debian FTP archive:

m4_1.4-13.diff.gz
  to pool/main/m/m4/m4_1.4-13.diff.gz
m4_1.4-13.dsc
  to pool/main/m/m4/m4_1.4-13.dsc
m4_1.4-13_i386.deb
  to pool/main/m/m4/m4_1.4-13_i386.deb
m4_1.4-13_hurd-i386.deb
  to pool/main/m/m4/m4_1.4-13_hurd-i386.deb
m4-doc_1.4-13_all.deb
  to pool/main/m/m4/m4-doc_1.4-13_all.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 53052@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated m4 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.6
Date: Wed,  4 Apr 2001 16:47:08 +0200
Source: m4
Binary: m4 m4-doc
Architecture: source i386 hurd-i386 all
Version: 1.4-13
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Description: 
 m4         - a macro processing language
 m4-doc     - Documentation for GNU m4.
Closes: 53052 92629
Changes: 
 m4 (1.4-13) unstable; urgency=low
 .
   * Do not mix buffered and unbuffered I/O, breaks autoconf under GNU/Hurd.
     Patch by Robert Bihlmeyer. Closes: #53052, #92629.
Files: 
 85a3c6dd4d0c141223bbafb7651398b5 607 interpreters standard m4_1.4-13.dsc
 295b7777964a3445ef6e066987a6686c 5233 interpreters standard m4_1.4-13.diff.gz
 23a9d4794eaf9f3e01dd684cd1163829 57708 doc optional m4-doc_1.4-13_all.deb
 7d3326feb4bae7f63c70c80c63a2852a 105754 interpreters standard m4_1.4-13_i386.deb
 15baedaeca556d10e6fb0496ae852fe8 106662 interpreters standard m4_1.4-13_hurd-i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6yzY9d9Uuvj7yPNYRApx9AJ9DDyQ5d//p/enmF0/bACN6eLILOACfWLpt
yHAOXem5dixh/PDwWLnLF+A=
=VcSK
-----END PGP SIGNATURE-----




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

From: Santiago Vila <sanvila@debian.org>
To: 92629-close@bugs.debian.org
Subject: Bug#92629: fixed in m4 1.4-13
Date: Wed, 04 Apr 2001 15:02:03 -0400
We believe that the bug you reported is fixed in the latest version of
m4, which has been installed in the Debian FTP archive:

m4_1.4-13.diff.gz
  to pool/main/m/m4/m4_1.4-13.diff.gz
m4_1.4-13.dsc
  to pool/main/m/m4/m4_1.4-13.dsc
m4_1.4-13_i386.deb
  to pool/main/m/m4/m4_1.4-13_i386.deb
m4_1.4-13_hurd-i386.deb
  to pool/main/m/m4/m4_1.4-13_hurd-i386.deb
m4-doc_1.4-13_all.deb
  to pool/main/m/m4/m4-doc_1.4-13_all.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 92629@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated m4 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.6
Date: Wed,  4 Apr 2001 16:47:08 +0200
Source: m4
Binary: m4 m4-doc
Architecture: source i386 hurd-i386 all
Version: 1.4-13
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Description: 
 m4         - a macro processing language
 m4-doc     - Documentation for GNU m4.
Closes: 53052 92629
Changes: 
 m4 (1.4-13) unstable; urgency=low
 .
   * Do not mix buffered and unbuffered I/O, breaks autoconf under GNU/Hurd.
     Patch by Robert Bihlmeyer. Closes: #53052, #92629.
Files: 
 85a3c6dd4d0c141223bbafb7651398b5 607 interpreters standard m4_1.4-13.dsc
 295b7777964a3445ef6e066987a6686c 5233 interpreters standard m4_1.4-13.diff.gz
 23a9d4794eaf9f3e01dd684cd1163829 57708 doc optional m4-doc_1.4-13_all.deb
 7d3326feb4bae7f63c70c80c63a2852a 105754 interpreters standard m4_1.4-13_i386.deb
 15baedaeca556d10e6fb0496ae852fe8 106662 interpreters standard m4_1.4-13_hurd-i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6yzY9d9Uuvj7yPNYRApx9AJ9DDyQ5d//p/enmF0/bACN6eLILOACfWLpt
yHAOXem5dixh/PDwWLnLF+A=
=VcSK
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 11:49:41 2014; Machine Name: buxtehude.debian.org

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