GNU bug report logs - #75924
maint: fix s390 buffer flushes

Previous Next

Package: gzip;

Reported by: Eduard Stefes <eduard.stefes <at> ibm.com>

Date: Wed, 29 Jan 2025 14:20:02 UTC

Severity: normal

Merged with 74651, 75911

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eduard Stefes <eduard.stefes <at> ibm.com>
Subject: bug#75911: closed (Re: bug#75924: maint: fix s390 buffer flushes)
Date: Tue, 08 Apr 2025 17:56:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#75924: maint: fix s390 buffer flushes

which was filed against the gzip package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 75911 <at> debbugs.gnu.org.

-- 
75924: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75924
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eduard Stefes <Eduard.Stefes <at> ibm.com>
Cc: "75924 <at> debbugs.gnu.org" <75924-done <at> debbugs.gnu.org>,
 "iii <at> linux.ibm.com" <iii <at> linux.ibm.com>,
 "andreas.hasenack <at> canonical.com" <andreas.hasenack <at> canonical.com>
Subject: Re: bug#75924: maint: fix s390 buffer flushes
Date: Tue, 8 Apr 2025 10:55:29 -0700
On 2025-02-20 03:33, Eduard Stefes wrote:
> I think we are at a solid state here, as both implementations run with
> the same test suit.
> Investing more time to get a 100% error message overlap looks like a
> bigger effort. We know that the hardware state machine does not simply
> map the software, so I fear that it will result in very very cumbersome
> error handling code.

OK, thanks for the analysis. Closing the bug report.

[Message part 3 (message/rfc822, inline)]
From: Eduard Stefes <eduard.stefes <at> ibm.com>
To: bug-gzip <bug-gzip <at> gnu.org>
Cc: Andreas Hasenack <andreas.hasenack <at> canonical.com>,
 Eduard Stefes <eduard.stefes <at> ibm.com>, Ilya Leoshkevich <iii <at> linux.ibm.com>
Subject: maint: fix s390 buffer flushes
Date: Tue, 28 Jan 2025 15:37:01 +0100
Problem reported by Nick Rosbrook in:
https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/2083700

align the behavior of dfltcc_inflate to do the same as gzip_inflate
when it hits a premature EOF
---
 dfltcc.c    | 7 ++++++-
 tests/hufts | 6 ++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dfltcc.c b/dfltcc.c
index 811c1f8..07726cb 100644
--- a/dfltcc.c
+++ b/dfltcc.c
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include <errno.h>
 
 #ifdef HAVE_SYS_SDT_H
 # include <sys/sdt.h>
@@ -437,7 +438,11 @@ dfltcc_inflate ()
           if (fill_inbuf (1) == EOF)
             {
               /* Premature EOF.  */
-              return 2;
+              flush_outbuf();
+              errno = 0;
+              read_error();
+              /* Premature EOF.  */
+              __builtin_unreachable();
             }
           inptr = 0;
         }
diff --git a/tests/hufts b/tests/hufts
index c464ef6..6dbb8ac 100755
--- a/tests/hufts
+++ b/tests/hufts
@@ -40,10 +40,12 @@ compare exp err || fail=1
 
 printf '\037\213\010\000\060\060\060\060\060\060\144\000\000\000' > bug33501 \
   || framework_failure_
-printf '\ngzip: stdin: invalid compressed data--format violated\n' >exp33501 \
+printf '\ngzip: stdin: invalid compressed data--format violated\n' > exp33501.1 \
+  || framework_failure_
+printf '\ngzip: stdin: unexpected end of file\n' > exp33501.2 \
   || framework_failure_
 returns_ 1 gzip -d <bug33501 >out33501 2> err33501-raw || fail=1
 sed "$clean_stderr" err33501-raw > err33501 || framework_failure_
-compare exp33501 err33501 || fail=1
+compare exp33501.1 err33501 || compare exp33501.2 err33501 || fail=1
 
 Exit $fail
-- 
2.48.0




This bug report was last modified 42 days ago.

Previous Next


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