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: Andreas Hasenack <andreas.hasenack <at> canonical.com>
To: Eduard Stefes <eduard.stefes <at> ibm.com>
Cc: 75924 <at> debbugs.gnu.org, Ilya Leoshkevich <iii <at> linux.ibm.com>
Subject: bug#75924: gzip: add special eof handling for s390x
Date: Tue, 18 Feb 2025 10:30:12 -0300
Hi,

This is on top of the previous patch I presume? It doesn't have the
__builtin_unreachable() line the previous patch added, but I might
have missed an update.

On Mon, Feb 17, 2025 at 7:44 AM Eduard Stefes <eduard.stefes <at> ibm.com> wrote:
>
> due to hardware limitations we cannot rely on the OESC error code
> before the hardware parsed the initial huffman tree. For this case
> we have to add a branch to the EOF handling. we return an errorcode 2
> (invalid data) if we where still in the initial phase (bytes_out == 0).
> Otherwise we continue with the default EOF handling.
> ---
>  dfltcc.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/dfltcc.c b/dfltcc.c
> index 9f86581..e45b3ce 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>
> @@ -438,6 +439,8 @@ dfltcc_inflate ()
>              {
>                /* Premature EOF.  */
>                flush_outbuf ();
> +              if (bytes_out == 0)
> +                return 2;
>                errno = 0;
>                read_error ();
>              }
> --
> 2.48.1
>




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.