From owner-dev-commits-ports-all@freebsd.org Sat Jul 31 20:05:57 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B255663B1B; Sat, 31 Jul 2021 20:05:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GcZyX6FYXz3CnN; Sat, 31 Jul 2021 20:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD4B31F060; Sat, 31 Jul 2021 20:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16VK5uML026353; Sat, 31 Jul 2021 20:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16VK5uQt026352; Sat, 31 Jul 2021 20:05:56 GMT (envelope-from git) Date: Sat, 31 Jul 2021 20:05:56 GMT Message-Id: <202107312005.16VK5uQt026352@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 1b1f9cf1172d - 2021Q3 - devel/judy: Import patch to fix memory corruption MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q3 X-Git-Reftype: branch X-Git-Commit: 1b1f9cf1172d910ac2478a32f474bb5c60b30b98 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2021 20:05:57 -0000 The branch 2021Q3 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=1b1f9cf1172d910ac2478a32f474bb5c60b30b98 commit 1b1f9cf1172d910ac2478a32f474bb5c60b30b98 Author: Daniel Engberg AuthorDate: 2021-07-31 20:03:52 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-31 20:05:49 +0000 devel/judy: Import patch to fix memory corruption PR: 257429 Obtained from: https://github.com/netdata/libjudy/commit/e95874a4e271d0f8535ab78862af3d57d33e9d1e (cherry picked from commit 0e8cb6eb96e1a55e7d57deea3d79b3ba5d6e6ac5) --- devel/judy/Makefile | 8 +-- .../files/patch-src_JudyCommon_JudyPrivateBranch.h | 63 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/devel/judy/Makefile b/devel/judy/Makefile index 5ec3d1cd893d..0fa62305b12d 100644 --- a/devel/judy/Makefile +++ b/devel/judy/Makefile @@ -1,10 +1,10 @@ # Created by: Sergey Skvortsov PORTNAME= Judy -PORTVERSION= 1.0.5 -PORTREVISION= 2 +DISTVERSION= 1.0.5 +PORTREVISION= 3 CATEGORIES= devel -MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME:tl}/${PORTNAME}-${PORTVERSION} +MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME:tl}/${PORTNAME}-${DISTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= General purpose dynamic array @@ -20,7 +20,7 @@ USE_LDCONFIG= yes MAKE_JOBS_UNSAFE= yes INSTALL_TARGET= install-strip -WRKSRC= ${WRKDIR}/${PORTNAME:tl}-${PORTVERSION} +WRKSRC= ${WRKDIR}/${PORTNAME:tl}-${DISTVERSION} PORTDOCS= COPYRIGHT README *.htm diff --git a/devel/judy/files/patch-src_JudyCommon_JudyPrivateBranch.h b/devel/judy/files/patch-src_JudyCommon_JudyPrivateBranch.h new file mode 100644 index 000000000000..1ec54f729247 --- /dev/null +++ b/devel/judy/files/patch-src_JudyCommon_JudyPrivateBranch.h @@ -0,0 +1,63 @@ +--- src/JudyCommon/JudyPrivateBranch.h.orig 2005-02-15 21:06:07 UTC ++++ src/JudyCommon/JudyPrivateBranch.h +@@ -55,7 +55,7 @@ typedef struct J_UDY_POINTER_OTHERS // JPO. + { + Word_t j_po_Addr; // first word: Pjp_t, Word_t, etc. + union { +-// Word_t j_po_DcdPop0:cJU_BITSPERWORD-cJU_BITSPERBYTE; ++ Word_t j_po_Addr1; + uint8_t j_po_DcdP0[sizeof(Word_t) - 1]; + uint8_t j_po_Bytes[sizeof(Word_t)]; // last byte = jp_Type. + } jpo_u; +@@ -78,13 +78,18 @@ typedef struct J_UDY_POINTER_OTHERS // JPO. + // TBD: Revise this structure to not overload j_po_DcdPopO this way? The + // current arrangement works, its just confusing. + +-typedef struct _JUDY_POINTER_IMMED // JPI. ++typedef struct _JUDY_POINTER_IMMEDL + { +- uint8_t j_pi_1Index[sizeof(Word_t)]; // see above. +- uint8_t j_pi_LIndex[sizeof(Word_t) - 1]; // see above. +- uint8_t j_pi_Type; // JP type, 1 of cJ*_JPIMMED*. +- } jpi_t; ++ Word_t j_pL_Addr; ++ uint8_t j_pL_LIndex[sizeof(Word_t) - 1]; // see above. ++ uint8_t j_pL_Type; ++ } jpL_t; + ++typedef struct _JUDY_POINTER_IMMED1 ++ { ++ uint8_t j_p1_1Index[(2 * sizeof(Word_t)) - 1]; ++ uint8_t j_p1_Type; ++ } jp1_t; + + // UNION OF JP TYPES: + // +@@ -96,18 +101,22 @@ typedef struct _JUDY_POINTER_IMMED // JPI. + typedef union J_UDY_POINTER // JP. + { + jpo_t j_po; // other than immediate indexes. +- jpi_t j_pi; // immediate indexes. ++ jpL_t j_pL; // immediate indexes. ++ jp1_t j_p1; // immediate indexes. + } jp_t, *Pjp_t; + + // For coding convenience: + // +-// Note, jp_Type has the same bits in jpo_t and jpi_t. ++// Note, jp_Type has the same bits in jpo_t jpL_t and jp1_t. + +-#define jp_1Index j_pi.j_pi_1Index // for storing Indexes in first word. +-#define jp_LIndex j_pi.j_pi_LIndex // for storing Indexes in second word. ++#define jp_1Index j_p1.j_p1_1Index // for storing Indexes in first word. ++#define jp_LIndex j_pL.j_pL_LIndex // for storing Indexes in second word. + #define jp_Addr j_po.j_po_Addr ++#define jp_Addr1 j_po.jpo_u.j_po_Addr1 + //#define jp_DcdPop0 j_po.jpo_u.j_po_DcdPop0 +-#define jp_Type j_po.jpo_u.j_po_Bytes[sizeof(Word_t) - 1] ++#define jp_Addr1 j_po.jpo_u.j_po_Addr1 ++//#define jp_Type j_po.jpo_u.j_po_Bytes[sizeof(Word_t) - 1] ++#define jp_Type j_p1.j_p1_Type + #define jp_DcdP0 j_po.jpo_u.j_po_DcdP0 + +