From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DCFB659CAB for ; Mon, 28 Mar 2016 14:58:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D92821C005; Mon, 28 Mar 2016 14:58:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AC2DF21C005 for ; Mon, 28 Mar 2016 14:57:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 68E7434094F for ; Mon, 28 Mar 2016 14:57:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BEE7886F for ; Mon, 28 Mar 2016 14:57:54 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1459176981.a9a0530441182f298ed9091d09fe5987d60e8a7e.axs@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: dev-libs/jemalloc/files/, dev-libs/jemalloc/ X-VCS-Repository: proj/mozilla X-VCS-Files: dev-libs/jemalloc/Manifest dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch dev-libs/jemalloc/jemalloc-4.0.4.ebuild dev-libs/jemalloc/jemalloc-4.1.0.ebuild X-VCS-Directories: dev-libs/jemalloc/files/ dev-libs/jemalloc/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: a9a0530441182f298ed9091d09fe5987d60e8a7e X-VCS-Branch: master Date: Mon, 28 Mar 2016 14:57: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-Archives-Salt: ada88f5f-59f2-45f8-a5c6-92594cfe5b68 X-Archives-Hash: dd7742edf8952ff780a18bc00739a33a commit: a9a0530441182f298ed9091d09fe5987d60e8a7e Author: Ian Stakenvicius gentoo org> AuthorDate: Mon Mar 28 14:56:15 2016 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Mon Mar 28 14:56:21 2016 +0000 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=a9a05304 version bump to jemalloc-4.1.0 Included upstream commit 33184bf69813087 as requested by rust dev's to allow system jemalloc to be used with rust/llvm. dev-libs/jemalloc/Manifest | 2 +- .../files/jemalloc-4.1-fix_stack_corruption.patch | 70 ++++++++++++++++++++++ ...jemalloc-4.0.4.ebuild => jemalloc-4.1.0.ebuild} | 16 +++-- 3 files changed, 78 insertions(+), 10 deletions(-) diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest index 0d48e6d..e9bbcdc 100644 --- a/dev-libs/jemalloc/Manifest +++ b/dev-libs/jemalloc/Manifest @@ -1 +1 @@ -DIST jemalloc-4.0.4.tar.bz2 391483 SHA256 3fda8d8d7fcd041aa0bebbecd45c46b28873cf37bd36c56bf44961b36d0f42d0 SHA512 93be0551a80d5f5dc3a1044ef3d5f06c5ce65f3c1fd753743ee64340b841fc2d7902178774ab71eaa633f68abad44109870eb84159679fdc8ce6d93db3a53112 WHIRLPOOL c8bc1a81555b30ff519fda90bfbcfcdb6c9e370ba7478bca17058e58e08c36d20a1995ab12d5374d4edb9cdd2469748517a6f1795a24667c5f798c4c0c756a9c +DIST jemalloc-4.1.0.tar.bz2 412900 SHA256 fad06d714f72adb4265783bc169c6d98eeb032d57ba02d87d1dcb4a2d933ec8e SHA512 12433101936a104115d8d93991b4849daf897bd39d6c28b1235215c7abc627163a70d19259fb1f2eeb0cdd66cfe889c2e40eb77dccee6debd73b1a4313d0de73 WHIRLPOOL 0305d1cc715c565749c5e9c2de396d349c0d79513da80b461324c82f880c6a070a932cea19802ac809810fe01690dcb24047914f937ddf167a990cf7b4110f0c diff --git a/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch new file mode 100644 index 0000000..f36c188 --- /dev/null +++ b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch @@ -0,0 +1,70 @@ +From 33184bf69813087bf1885b0993685f9d03320c69 Mon Sep 17 00:00:00 2001 +From: Dmitri Smirnov +Date: Mon, 29 Feb 2016 14:30:19 -0800 +Subject: [PATCH] Fix stack corruption and uninitialized var warning + +Stack corruption happens in x64 bit + +This resolves #347. +--- + src/arena.c | 2 +- + test/unit/hash.c | 13 +++++++------ + 2 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/src/arena.c b/src/arena.c +index 99e20fd..965c0fe 100644 +--- a/src/arena.c ++++ b/src/arena.c +@@ -2423,7 +2423,7 @@ arena_malloc_large(tsd_t *tsd, arena_t *arena, szind_t binind, bool zero) + uintptr_t random_offset; + arena_run_t *run; + arena_chunk_map_misc_t *miscelm; +- UNUSED bool idump; ++ UNUSED bool idump JEMALLOC_CC_SILENCE_INIT(false); + + /* Large allocation. */ + usize = index2size(binind); +diff --git a/test/unit/hash.c b/test/unit/hash.c +index f50ba81..010c9d7 100644 +--- a/test/unit/hash.c ++++ b/test/unit/hash.c +@@ -64,14 +64,15 @@ static void + hash_variant_verify_key(hash_variant_t variant, uint8_t *key) + { + const int hashbytes = hash_variant_bits(variant) / 8; +- VARIABLE_ARRAY(uint8_t, hashes, hashbytes * 256); ++ const int hashes_size = hashbytes * 256; ++ VARIABLE_ARRAY(uint8_t, hashes, hashes_size); + VARIABLE_ARRAY(uint8_t, final, hashbytes); + unsigned i; + uint32_t computed, expected; + + memset(key, 0, KEY_SIZE); +- memset(hashes, 0, sizeof(hashes)); +- memset(final, 0, sizeof(final)); ++ memset(hashes, 0, hashes_size); ++ memset(final, 0, hashbytes); + + /* + * Hash keys of the form {0}, {0,1}, {0,1,2}, ..., {0,1,...,255} as the +@@ -102,17 +103,17 @@ hash_variant_verify_key(hash_variant_t variant, uint8_t *key) + /* Hash the result array. */ + switch (variant) { + case hash_variant_x86_32: { +- uint32_t out = hash_x86_32(hashes, hashbytes*256, 0); ++ uint32_t out = hash_x86_32(hashes, hashes_size, 0); + memcpy(final, &out, sizeof(out)); + break; + } case hash_variant_x86_128: { + uint64_t out[2]; +- hash_x86_128(hashes, hashbytes*256, 0, out); ++ hash_x86_128(hashes, hashes_size, 0, out); + memcpy(final, out, sizeof(out)); + break; + } case hash_variant_x64_128: { + uint64_t out[2]; +- hash_x64_128(hashes, hashbytes*256, 0, out); ++ hash_x64_128(hashes, hashes_size, 0, out); + memcpy(final, out, sizeof(out)); + break; + } default: not_reached(); diff --git a/dev-libs/jemalloc/jemalloc-4.0.4.ebuild b/dev-libs/jemalloc/jemalloc-4.1.0.ebuild similarity index 88% rename from dev-libs/jemalloc/jemalloc-4.0.4.ebuild rename to dev-libs/jemalloc/jemalloc-4.1.0.ebuild index 5cbaa8d..28ecefb 100644 --- a/dev-libs/jemalloc/jemalloc-4.0.4.ebuild +++ b/dev-libs/jemalloc/jemalloc-4.1.0.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 -inherit autotools-multilib eutils +inherit autotools toolchain-funcs multilib-build DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator" HOMEPAGE="http://www.canonware.com/jemalloc/" @@ -17,18 +17,18 @@ IUSE="debug static-libs stats" HTML_DOCS=( doc/jemalloc.html ) PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch" "${FILESDIR}/${PN}-3.5.1_fix_html_install.patch" + "${FILESDIR}/${PN}-4.1-fix_stack_corruption.patch" ) MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h ) # autotools-utils.eclass auto-adds configure options when static-libs is in IUSE # but jemalloc doesn't implement them in its configure; need this here to # supress the warnings until automagic is removed from the eclass QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared" -src_configure() { - myeconfargs=( + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ $(use_enable debug) $(use_enable stats) - ) - autotools-multilib_src_configure } multilib_src_install() { @@ -37,9 +37,7 @@ multilib_src_install() { emake DESTDIR="${D}" install } -src_install() { - autotools-multilib_src_install - +multilib_src_install_all() { if [[ ${CHOST} == *-darwin* ]] ; then # fixup install_name, #437362 install_name_tool \