import gzip-1.9-12.el8
This commit is contained in:
parent
a30be00eea
commit
6ee73c0898
67
SOURCES/dfltcc-segfault.patch
Normal file
67
SOURCES/dfltcc-segfault.patch
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
dfltcc.c | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dfltcc.c b/dfltcc.c
|
||||
index 86aa56e..3a5b92d 100644
|
||||
--- a/dfltcc.c
|
||||
+++ b/dfltcc.c
|
||||
@@ -242,10 +242,8 @@ dfltcc_gdht (struct dfltcc_param_v0 *param)
|
||||
dfltcc (DFLTCC_GDHT, param, NULL, NULL, &next_in, &avail_in, NULL);
|
||||
}
|
||||
|
||||
-static off_t total_in;
|
||||
-
|
||||
static dfltcc_cc
|
||||
-dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn)
|
||||
+dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn, off_t *total_in)
|
||||
{
|
||||
uch *next_out = outbuf + outcnt;
|
||||
size_t avail_out = OUTBUFSIZ - outcnt;
|
||||
@@ -257,7 +255,7 @@ dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn)
|
||||
window);
|
||||
off_t consumed_in = next_in - (inbuf + inptr);
|
||||
inptr += consumed_in;
|
||||
- total_in += consumed_in;
|
||||
+ *total_in += consumed_in;
|
||||
outcnt += ((OUTBUFSIZ - outcnt) - avail_out);
|
||||
return cc;
|
||||
}
|
||||
@@ -349,6 +347,7 @@ dfltcc_deflate (int pack_level)
|
||||
|
||||
union aligned_dfltcc_param_v0 ctx_v0;
|
||||
struct dfltcc_param_v0 *param = init_param (&ctx_v0);
|
||||
+ off_t total_in = 0;
|
||||
|
||||
/* Compress ifd into ofd in a loop. */
|
||||
while (true)
|
||||
@@ -398,7 +397,8 @@ dfltcc_deflate (int pack_level)
|
||||
}
|
||||
|
||||
/* Compress inbuf into outbuf. */
|
||||
- while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) == DFLTCC_CC_AGAIN)
|
||||
+ while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR, &total_in)
|
||||
+ == DFLTCC_CC_AGAIN)
|
||||
;
|
||||
|
||||
/* Unmask the input data. */
|
||||
@@ -427,6 +427,7 @@ dfltcc_inflate (void)
|
||||
|
||||
union aligned_dfltcc_param_v0 ctx_v0;
|
||||
struct dfltcc_param_v0 *param = init_param (&ctx_v0);
|
||||
+ off_t total_in = 0;
|
||||
|
||||
/* Decompress ifd into ofd in a loop. */
|
||||
while (true)
|
||||
@@ -446,7 +447,8 @@ dfltcc_inflate (void)
|
||||
|
||||
/* Decompress inbuf into outbuf. */
|
||||
dfltcc_cc cc;
|
||||
- while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) == DFLTCC_CC_AGAIN)
|
||||
+ while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND, &total_in))
|
||||
+ == DFLTCC_CC_AGAIN)
|
||||
;
|
||||
if (cc == DFLTCC_CC_OK)
|
||||
{
|
||||
--
|
||||
2.25.4
|
12
SOURCES/ibm5.patch
Normal file
12
SOURCES/ibm5.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/tests/hufts b/tests/hufts
|
||||
index 5d8fb77..1b8ab3b 100755
|
||||
--- a/tests/hufts
|
||||
+++ b/tests/hufts
|
||||
@@ -28,6 +28,7 @@ returns_ 1 gzip -dc "$abs_srcdir/hufts-segv.gz" > out 2> err || fail=1
|
||||
compare /dev/null out || fail=1
|
||||
|
||||
sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=1
|
||||
+grep -v 'Operation-Ending-Supplemental Code' err > k; mv k err || fail=1
|
||||
compare exp err || fail=1
|
||||
|
||||
Exit $fail
|
@ -1,7 +1,7 @@
|
||||
Summary: The GNU data compression program
|
||||
Name: gzip
|
||||
Version: 1.9
|
||||
Release: 9%{?dist}
|
||||
Release: 12%{?dist}
|
||||
# info pages are under GFDL license
|
||||
License: GPLv3+ and GFDL
|
||||
Group: Applications/File
|
||||
@ -21,7 +21,8 @@ Patch4: ibm2.patch
|
||||
#Patch5: ibm3.patch
|
||||
# https://lists.gnu.org/archive/html/bug-gzip/2019-07/msg00000.html
|
||||
Patch6: ibm4.patch
|
||||
|
||||
Patch7: dfltcc-segfault.patch
|
||||
Patch8: ibm5.patch
|
||||
|
||||
# Fixed in upstream code.
|
||||
# http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378
|
||||
@ -55,6 +56,8 @@ very commonly used data compression program.
|
||||
%patch4 -p1 -b .ibm2
|
||||
#%patch5 -p1 -b .ibm3
|
||||
%patch6 -p1 -b .ibm4
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
cp %{SOURCE1} .
|
||||
autoreconf
|
||||
|
||||
@ -66,7 +69,8 @@ export CPP="%{__cpp}"
|
||||
export CXX="%{__cxx}"
|
||||
|
||||
%ifarch s390x
|
||||
%configure --enable-dfltcc
|
||||
export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e"
|
||||
%configure --enable-dfltcc
|
||||
%else
|
||||
%configure
|
||||
%endif
|
||||
@ -115,6 +119,18 @@ fi
|
||||
%{profiledir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Jan 07 2021 Jakub Martisko <jamartis@redhat.com> - 1.9-12
|
||||
- Fix a test failure introduced by 1.9-10
|
||||
Related: 1883204
|
||||
|
||||
* Thu Oct 22 2020 Jakub Martisko <jamartis@redhat.com> - 1.9-11
|
||||
- Enable HW optimizations for modes 1-6 on s390x
|
||||
Resolves: 1847436
|
||||
|
||||
* Thu Oct 22 2020 Jakub Martisko <jamartis@redhat.com> - 1.9-10
|
||||
- Fix a segfault on some s390x machines when compressing multiple files
|
||||
Resolves: 1883204
|
||||
|
||||
* Mon Jul 15 2019 Jakub Martisko <jamartis@redhat.com> - 1.9-9
|
||||
- Another fix for the s390 patch
|
||||
Related: 1730332
|
||||
|
Loading…
Reference in New Issue
Block a user