diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-02-29 19:13:22 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-02-29 19:13:22 +0000 |
commit | ee60a5d26191e105a5aff59fe033efc4240477d2 (patch) | |
tree | 49ddb7a838eae14a2e1b5d8066ae956e4426ec93 /www-plugins/gnash | |
parent | Version bump to 9.9.0, also fixes bug 405251. (diff) | |
download | gentoo-2-ee60a5d26191e105a5aff59fe033efc4240477d2.tar.gz gentoo-2-ee60a5d26191e105a5aff59fe033efc4240477d2.tar.bz2 gentoo-2-ee60a5d26191e105a5aff59fe033efc4240477d2.zip |
Add patch to fix broken jemalloc, bug #405993.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'www-plugins/gnash')
-rw-r--r-- | www-plugins/gnash/ChangeLog | 9 | ||||
-rw-r--r-- | www-plugins/gnash/files/gnash-0.8.10-jemalloc-aslr-fix.patch | 52 | ||||
-rw-r--r-- | www-plugins/gnash/gnash-0.8.10-r1.ebuild (renamed from www-plugins/gnash/gnash-0.8.10.ebuild) | 5 |
3 files changed, 64 insertions, 2 deletions
diff --git a/www-plugins/gnash/ChangeLog b/www-plugins/gnash/ChangeLog index f3a41412b411..cf1c857977e4 100644 --- a/www-plugins/gnash/ChangeLog +++ b/www-plugins/gnash/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-plugins/gnash # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.78 2012/02/27 11:28:38 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/ChangeLog,v 1.79 2012/02/29 19:13:22 chithanh Exp $ + +*gnash-0.8.10-r1 (29 Feb 2012) + + 29 Feb 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + -gnash-0.8.10.ebuild, +gnash-0.8.10-r1.ebuild, + +files/gnash-0.8.10-jemalloc-aslr-fix.patch: + Add patch to fix broken jemalloc, bug #405993. 27 Feb 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> gnash-0.8.10.ebuild, +files/gnash-0.8.10-npapi-sdk.patch: diff --git a/www-plugins/gnash/files/gnash-0.8.10-jemalloc-aslr-fix.patch b/www-plugins/gnash/files/gnash-0.8.10-jemalloc-aslr-fix.patch new file mode 100644 index 000000000000..413744c4b3c4 --- /dev/null +++ b/www-plugins/gnash/files/gnash-0.8.10-jemalloc-aslr-fix.patch @@ -0,0 +1,52 @@ +diff -Naur gnash-0.8.10.alt/libbase/jemalloc.c gnash-0.8.10/libbase/jemalloc.c +--- gnash-0.8.10.alt/libbase/jemalloc.c 2012-02-07 09:39:41.000000000 +0100 ++++ gnash-0.8.10/libbase/jemalloc.c 2012-02-24 18:36:47.000000000 +0100 +@@ -429,7 +429,7 @@ + static const bool __isthreaded = true; + #endif + +-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) ++#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) || defined(MOZ_MEMORY_LINUX) + #define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */ + #endif + +@@ -2238,6 +2238,7 @@ + * We don't use MAP_FIXED here, because it can cause the *replacement* + * of existing mappings, and we only want to create new mappings. + */ ++#ifdef MOZ_MEMORY_SOLARIS + #ifdef MALLOC_PAGEFILE + if (pfd != -1) { + ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | +@@ -2252,6 +2253,31 @@ + + if (ret == MAP_FAILED) + ret = NULL; ++#else /* !MOZ_MEMORY_SOLARIS */ ++#ifdef MALLOC_PAGEFILE ++ if (pfd != -1) { ++ ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | ++ MAP_NOSYNC, pfd, 0); ++ } else ++#endif ++ { ++ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE | ++ MAP_NOSYNC | MAP_ANON, -1, 0); ++ } ++ assert(ret != NULL); ++ ++ if (ret == MAP_FAILED) ++ return NULL; ++ ++ uintptr_t aligned_ret; ++ size_t extra_size; ++ aligned_ret = (uintptr_t)ret + alignment - 1; ++ aligned_ret &= ~(alignment - 1); ++ extra_size = aligned_ret - (uintptr_t)ret; ++ munmap(ret, extra_size); ++ munmap(ret + extra_size + size, alignment - extra_size); ++ ret = (void*)aligned_ret; ++#endif /* ifdef MOZ_MEMORY_SOLARIS*/ + return (ret); + } + #endif diff --git a/www-plugins/gnash/gnash-0.8.10.ebuild b/www-plugins/gnash/gnash-0.8.10-r1.ebuild index ea1c0c7a4c24..428d6c438f3e 100644 --- a/www-plugins/gnash/gnash-0.8.10.ebuild +++ b/www-plugins/gnash/gnash-0.8.10-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.10.ebuild,v 1.5 2012/02/27 11:28:38 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/gnash/gnash-0.8.10-r1.ebuild,v 1.1 2012/02/29 19:13:22 chithanh Exp $ EAPI=4 CMAKE_REQUIRED="never" @@ -158,6 +158,9 @@ src_prepare() { # Allow building against npapi-sdk, bug #383071 epatch "${FILESDIR}"/${PN}-0.8.10-npapi-sdk.patch + # Fix broken jemalloc, bug #405993 + epatch "${FILESDIR}"/${PN}-0.8.10-jemalloc-aslr-fix.patch + eautoreconf } src_configure() { |