diff --git a/double-free.patch b/double-free.patch deleted file mode 100644 index 92877f4..0000000 --- a/double-free.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/interpret.h b/interpret.h -index 57d060e6..26010ada 100644 ---- a/interpret.h -+++ b/interpret.h -@@ -213,7 +213,7 @@ top: - case Node_var_new: - uninitialized_scalar: - if (op != Op_push_arg_untyped) { -- /* convert untyped to scalar */ -+ /* convert very original untyped to scalar */ - m->type = Node_var; - m->var_value = dupnode(Nnull_string); - } -@@ -222,6 +222,7 @@ uninitialized_scalar: - _("reference to uninitialized argument `%s'") : - _("reference to uninitialized variable `%s'"), - save_symbol->vname); -+ // set up local param by value - if (op != Op_push_arg_untyped) - m = dupnode(Nnull_string); - UPREF(m); -@@ -230,14 +231,20 @@ uninitialized_scalar: - - case Node_elem_new: - if (op != Op_push_arg_untyped) { -- /* convert untyped to scalar */ -- m = elem_new_to_scalar(m); -+ /* convert very original untyped to scalar */ -+ m->type = Node_var; -+ m->var_value = dupnode(Nnull_string); - } - if (do_lint) - lintwarn(isparam ? - _("reference to uninitialized argument `%s'") : - _("reference to uninitialized variable `%s'"), - save_symbol->vname); -+ // set up local param by value -+ if (op != Op_push_arg_untyped) { -+ m = dupnode(Nnull_string); -+ } -+ - PUSH(m); - break; - diff --git a/gawk-5.2.0.tar.xz b/gawk-5.2.0.tar.xz deleted file mode 100644 index 231fe1d..0000000 --- a/gawk-5.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e4ddbad1c2ef10e8e815ca80208d0162d4c983e6cca16f925e8418632d639018 -size 3385496 diff --git a/gawk-5.2.0.tar.xz.sig b/gawk-5.2.0.tar.xz.sig deleted file mode 100644 index ce83f9e..0000000 --- a/gawk-5.2.0.tar.xz.sig +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCgAdFiEE0ZZ8Y3iHExd9hh7X31l4FZN+wNIFAmMU5PsACgkQ31l4FZN+ -wNLLZgf/RDts4gLdvVPD2ZJVHDm25ePV1VLZuexuCkR6e3/m8L2kjpDfX0Vz1URS -p7H9ZIPmRRsz//l8eO+gXqxJiZiDEh73KdZo+ksJbDtCAwS8j+vE3YaF+PjxMJiA -OMJwaCHm6/yA7xNJ7YA11ybSpSnqb5lIvoXrnfqax0WNwrH5T+XcubQxa7xJC/1E -MYpM7fYo9NjCEAM+jSOifkh8TcPhblZQl3hpS0iGmqbCJWVF/8d/um6QWt0WnpKl -8ZmyK95X8vYO5jzL+7UX//MP2TI53jpK2hf3BAKBU1TgsqN28p4qwMtKKHI5Ro7J -xWENFQV96WWnoIKJlNHaciIRyzJKvQ== -=vgeQ ------END PGP SIGNATURE----- diff --git a/gawk-5.2.1.tar.xz b/gawk-5.2.1.tar.xz new file mode 100644 index 0000000..1cf1330 --- /dev/null +++ b/gawk-5.2.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:673553b91f9e18cc5792ed51075df8d510c9040f550a6f74e09c9add243a7e4f +size 3411420 diff --git a/gawk-5.2.1.tar.xz.sig b/gawk-5.2.1.tar.xz.sig new file mode 100644 index 0000000..21091a6 --- /dev/null +++ b/gawk-5.2.1.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEE0ZZ8Y3iHExd9hh7X31l4FZN+wNIFAmN8+qMACgkQ31l4FZN+ +wNK3+AgAuu1D9gr7xkV3bLj09AmHg6QPMsBuHGh7PMtNpt2pTaIfa/vabXqYFv0G +es1Z8AL7P+vkmMSSTH/aAGuTVe+VTQ+x93d6PVKTjOQ6tB4SCdKnJ6XZiLFhrCDY +q8OI0YpJuCYeS5W09zRFhFdB0OAiuVUdQf+uhWCDk2NZZzwbRa8lA0WabWVRzpKZ +b73q58bO4T0LhmPoUs83WHqeCdPn8YX0cMfo++02WqPahchMR931RYmNhlp90+Mg +hO7eMTOe1PFfT8wFMgs7dt0vToBGnECQtoOZ8XGuLLOb/mo6CjZBFlTRDLIfERRV +anyAC67f3NEDPkp9XS0/i6qw9uEoSw== +=CFP4 +-----END PGP SIGNATURE----- diff --git a/gawk.changes b/gawk.changes index 39f9eb9..05a9dde 100644 --- a/gawk.changes +++ b/gawk.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Nov 23 09:15:25 UTC 2022 - Andreas Schwab + +- Update to gawk 5.2.1 + * Issues related to the sign of NaN and Inf values on RiscV have + been fixed + * A few issues with the debugger have been fixed. + * More subtle issues with untyped array elements being passed to + functions have been fixed. + * The rwarray extension's readall() function has had some bugs fixed. + * The PMA allocator is now supported on FreeBSD, OpenBSD and Linux on + S/390x. +- double-free.patch, pma.patch, nan-sign.patch: Removed + ------------------------------------------------------------------- Sat Sep 24 08:40:01 UTC 2022 - Andreas Schwab diff --git a/gawk.spec b/gawk.spec index 78b96c9..1ae06d7 100644 --- a/gawk.spec +++ b/gawk.spec @@ -17,7 +17,7 @@ Name: gawk -Version: 5.2.0 +Version: 5.2.1 Release: 0 Summary: Domain-specific language for text processing License: GPL-3.0-or-later @@ -27,9 +27,6 @@ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: http://savannah.gnu.org/people/viewgpg.php?user_id=80653#/gawk.keyring Source4: gawk.rpmlintrc -Patch0: pma.patch -Patch1: nan-sign.patch -Patch2: double-free.patch Provides: awk BuildRequires: mpfr-devel BuildRequires: readline-devel diff --git a/nan-sign.patch b/nan-sign.patch deleted file mode 100644 index cb4101e..0000000 --- a/nan-sign.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/eval.c b/eval.c -index 1069570b7..44f614d22 100644 ---- a/eval.c -+++ b/eval.c -@@ -39,6 +39,8 @@ static int num_exec_hook = 0; - static Func_pre_exec pre_execute[MAX_EXEC_HOOKS]; - static Func_post_exec post_execute = NULL; - -+static double fix_nan_sign(double left, double right, double result); -+ - extern void frame_popped(); - - int OFSlen; -@@ -1901,3 +1903,16 @@ elem_new_to_scalar(NODE *n) - - return n; - } -+ -+/* fix_nan_sign --- fix NaN sign on RiscV */ -+ -+static double -+fix_nan_sign(double left, double right, double result) -+{ -+ if (isnan(left) && signbit(left)) -+ return copysign(result, -1.0); -+ else if (isnan(right) && signbit(right)) -+ return copysign(result, -1.0); -+ else -+ return result; -+} -diff --git a/interpret.h b/interpret.h -index 26010ada1..955d918f1 100644 ---- a/interpret.h -+++ b/interpret.h -@@ -583,6 +583,7 @@ uninitialized_scalar: - plus: - t1 = TOP_NUMBER(); - r = make_number(t1->numbr + x2); -+ r->numbr = fix_nan_sign(t1->numbr, x2, r->numbr); - DEREF(t1); - REPLACE(r); - break; -@@ -597,6 +598,7 @@ plus: - minus: - t1 = TOP_NUMBER(); - r = make_number(t1->numbr - x2); -+ r->numbr = fix_nan_sign(t1->numbr, x2, r->numbr); - DEREF(t1); - REPLACE(r); - break; diff --git a/pma.patch b/pma.patch deleted file mode 100644 index 9368ac6..0000000 --- a/pma.patch +++ /dev/null @@ -1,40 +0,0 @@ -Index: gawk-5.2.0/support/pma.c -=================================================================== ---- gawk-5.2.0.orig/support/pma.c -+++ gawk-5.2.0/support/pma.c -@@ -340,16 +340,20 @@ static void flr(ao_t *p) { // remove ao - #define MMAP(N) mmap(NULL, (N), PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0) - #define MUNMAP(A, N) do { if (0 != munmap((A), (N))) { ERR("munmap()" ERN); SERN; } } while (0) - static void * addrgap(off_t n) { // find big gap in address space to map n bytes -- void *A, *Amax = NULL; size_t L = 0, U, Max = 0, N = (size_t)n; char *r; -+ void *A, *Amax = NULL; size_t L, U, Max = 0, N = (size_t)n; char *r; - FYI("addrgap(%jd)\n", (intmax_t)n); // TODO: better way to handle off_t - if (N < sizeof(pma_hdr_t) + 40960) { ERR("file size %zu too small\n", N); SERN; } -- for (U = 1; ; U *= 2) // double upper bound until failure -- if (MAP_FAILED == (A = MMAP(U))) break; -- else MUNMAP(A, U); -- while (1 + L < U) { // binary search between bounds -+ // Binary search to find max length of successfull mmap(). -+ // Invariants: -+ // Larger max might lie in range [L,U] inclusive. -+ // If a previous max has been found, it must lie in [1,L-1]. -+ // A larger max cannot lie in [U+1,UINT64_MAX]. -+ L = 1; // mmap fails if length == 0 (SUSv3) -+ U = UINT64_MAX; -+ while (L <= U) { - size_t M = L + (U - L) / 2; // avoid overflow -- if (MAP_FAILED == (A = MMAP(M))) { U = M; } -- else { Amax = A; Max = M; MUNMAP(A, M); L = M; } -+ if (MAP_FAILED != (A = MMAP(M))) { assert(Max < M); Max = M; Amax = A; MUNMAP(A, M); if (UINT64_MAX == M) break; L = M + 1; } -+ else { assert(0 < M); U = M - 1; } - } - FYI("max gap: %zu bytes at %p\n", Max, Amax); - if (Max < N + (size_t)ALGN * 2) { // safety margin -@@ -392,6 +396,7 @@ int pma_init(int verbose, const char *fi - assert((himask | lomask) == ~((uintptr_t)0)); - if (! (WDSZ == sizeof(void *) && // in C11 we'd static_assert() - WDSZ == sizeof(size_t) && -+ WDSZ == sizeof(off_t) && - WDSZ == sizeof(unsigned long))) { ERR("word size not 64 bits\n"); SERL; } - assert(0 == sizeof(pma_hdr_t) % WDSZ); - if (NULL == file) {