From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3B1B138334 for ; Wed, 7 Aug 2019 19:13:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BBB20E0864; Wed, 7 Aug 2019 19:13:56 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 97C72E0864 for ; Wed, 7 Aug 2019 19:13:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A38E34932D for ; Wed, 7 Aug 2019 19:13:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3BFA6762 for ; Wed, 7 Aug 2019 19:13:54 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1565205222.cec154c3438eee983aa3eccbb2c9ebc072d781b0.mattst88@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/lbzip2/files/, app-arch/lbzip2/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild X-VCS-Directories: app-arch/lbzip2/files/ app-arch/lbzip2/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: cec154c3438eee983aa3eccbb2c9ebc072d781b0 X-VCS-Branch: master Date: Wed, 7 Aug 2019 19:13:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 294a2485-a064-4fff-b4b2-b07b1df999c6 X-Archives-Hash: 6118e565c9b00d6f34b2a1f21c3ec6ba commit: cec154c3438eee983aa3eccbb2c9ebc072d781b0 Author: Matt Turner gentoo org> AuthorDate: Wed Aug 7 19:02:07 2019 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Aug 7 19:13:42 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec154c3 app-arch/lbzip2: Add patch to fix unaligned access Also remove unnecessary eautoreconf since Whissi was nice enough to run make dist when he made the snapshot tarball. Signed-off-by: Matt Turner gentoo.org> .../files/lbzip2-2.5_p20181227-fix-unaligned.patch | 33 ++++++++++++++++++++++ ...81227.ebuild => lbzip2-2.5_p20181227-r1.ebuild} | 9 +----- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch b/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch new file mode 100644 index 00000000000..c23d1afc4ca --- /dev/null +++ b/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch @@ -0,0 +1,33 @@ +https://github.com/kjn/lbzip2/pull/25 + +From d570020ade2add591b97e61927545a005a2d4a6f Mon Sep 17 00:00:00 2001 +From: Matt Turner +Date: Wed, 7 Aug 2019 11:47:04 -0700 +Subject: [PATCH] Align zero-length array to avoid unaligned accesses + +When make_tree() creates the left-justified base table (uint64_t *B) +it does so with 64-bit stores: + + B[k] = sofar; + +But B points to memory in the zero-length array "uint32_t tt[0]" at the +end of struct decoder_state. Since tt's type is uint32_t, it is only +aligned to a four byte boundary, and so the 64-bit store in make_tree() +causes an unaligned trap on strict platforms like sparc. +--- + src/decode.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/decode.h b/src/decode.h +index c9a9086..7c0ca3f 100644 +--- a/src/decode.h ++++ b/src/decode.h +@@ -62,7 +62,7 @@ struct decoder_state { + uint8_t rle_char; /* current character */ + uint8_t rle_prev; /* prevoius character */ + +- uint32_t tt[0]; ++ uint32_t tt[0] __attribute__((aligned (8))); + }; + + diff --git a/app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild b/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild similarity index 92% rename from app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild rename to app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild index 04fa9267b15..7dc8fcd267f 100644 --- a/app-arch/lbzip2/lbzip2-2.5_p20181227.ebuild +++ b/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild @@ -3,8 +3,6 @@ EAPI="7" -inherit autotools - DESCRIPTION="Parallel bzip2 utility" HOMEPAGE="https://github.com/kjn/lbzip2/" SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.gz" @@ -19,14 +17,9 @@ DEPEND="" PATCHES=( "${FILESDIR}"/${PN}-2.3-s_isreg.patch + "${FILESDIR}"/${P}-fix-unaligned.patch ) -src_prepare() { - default - - eautoreconf -} - src_configure() { local myeconfargs=( --disable-silent-rules