Received: by mail.netbsd.org (Postfix, from userid 605) id C6E4984D93; Fri, 24 Jun 2022 15:40:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0BD9984D82 for ; Fri, 24 Jun 2022 15:40:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id AczI84pbbK0z for ; Fri, 24 Jun 2022 15:40:07 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 687D384CE3 for ; Fri, 24 Jun 2022 15:40:07 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 0AC00FB1A; Fri, 24 Jun 2022 15:42:11 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1656085331107950" MIME-Version: 1.0 Date: Fri, 24 Jun 2022 15:42:11 +0000 From: "Havard Eidnes" Subject: CVS commit: pkgsrc/databases/sqlite To: pkgsrc-changes@NetBSD.org Reply-To: he@netbsd.org X-Mailer: log_accum Message-Id: <20220624154211.0AC00FB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1656085331107950 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: he Date: Fri Jun 24 15:42:10 UTC 2022 Modified Files: pkgsrc/databases/sqlite: Makefile distinfo Added Files: pkgsrc/databases/sqlite/patches: patch-tool_lemon.c Log Message: databases/sqlite: add a minor fix to the lemon tool. On NetBSD/powerpc, 'hash' ended up negative, causing a SEGV. Instead, make the variable unsigned. Bump PKGREVISION. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 pkgsrc/databases/sqlite/Makefile cvs rdiff -u -r1.27 -r1.28 pkgsrc/databases/sqlite/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/databases/sqlite/patches/patch-tool_lemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1656085331107950 Content-Disposition: inline Content-Length: 2968 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/databases/sqlite/Makefile diff -u pkgsrc/databases/sqlite/Makefile:1.47 pkgsrc/databases/sqlite/Makefile:1.48 --- pkgsrc/databases/sqlite/Makefile:1.47 Sun Jan 26 17:30:54 2020 +++ pkgsrc/databases/sqlite/Makefile Fri Jun 24 15:42:10 2022 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.47 2020/01/26 17:30:54 rillig Exp $ +# $NetBSD: Makefile,v 1.48 2022/06/24 15:42:10 he Exp $ DISTNAME= sqlite-2.8.17 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= databases MASTER_SITES= http://www.hwaci.com/sw/sqlite/ MASTER_SITES+= http://www.sqlite.org/ Index: pkgsrc/databases/sqlite/distinfo diff -u pkgsrc/databases/sqlite/distinfo:1.27 pkgsrc/databases/sqlite/distinfo:1.28 --- pkgsrc/databases/sqlite/distinfo:1.27 Tue Oct 26 10:10:05 2021 +++ pkgsrc/databases/sqlite/distinfo Fri Jun 24 15:42:10 2022 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.27 2021/10/26 10:10:05 nia Exp $ +$NetBSD: distinfo,v 1.28 2022/06/24 15:42:10 he Exp $ BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37 SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f @@ -6,3 +6,4 @@ Size (sqlite-2.8.17.tar.gz) = 969805 byt SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703 SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559 SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8 +SHA1 (patch-tool_lemon.c) = 118f2cf965dd4eaddef7228bdca89f9cae26d7c3 Added files: Index: pkgsrc/databases/sqlite/patches/patch-tool_lemon.c diff -u /dev/null pkgsrc/databases/sqlite/patches/patch-tool_lemon.c:1.1 --- /dev/null Fri Jun 24 15:42:10 2022 +++ pkgsrc/databases/sqlite/patches/patch-tool_lemon.c Fri Jun 24 15:42:10 2022 @@ -0,0 +1,26 @@ +$NetBSD: patch-tool_lemon.c,v 1.1 2022/06/24 15:42:10 he Exp $ + +Avoid either undefined or implementation defined behaviour, +by making the base hash variable unsigned, so that we avoid +it ever going negative (as it did on powerpc). + +--- tool/lemon.c.orig 2005-04-23 22:43:22.000000000 +0000 ++++ tool/lemon.c +@@ -3016,7 +3016,7 @@ int mhflag; /* True if g + int maxdtlength; /* Maximum length of any ".datatype" field. */ + char *stddt; /* Standardized name for a datatype */ + int i,j; /* Loop counters */ +- int hash; /* For hashing the name of a type */ ++ unsigned int hash; /* For hashing the name of a type */ + char *name; /* Name of the parser */ + + /* Allocate and initialize types[] and allocate stddt[] */ +@@ -3068,7 +3068,7 @@ int mhflag; /* True if g + for(j=0; stddt[j]; j++){ + hash = hash*53 + stddt[j]; + } +- hash = (hash & 0x7fffffff)%arraysize; ++ hash = hash % arraysize; + while( types[hash] ){ + if( strcmp(types[hash],stddt)==0 ){ + sp->dtnum = hash + 1; --_----------=_1656085331107950--