aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:42:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:42:15 +0000
commitcd46eba6f617f9d99d6485c14d2375fb4bdd68ca (patch)
tree0a28dbf530e1bf63dc2fae356ea0c134988207d1 /testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
parentec35bbd33549a6d71640b9b9e77d1a9142e8fbd8 (diff)
downloadaports-cd46eba6f617f9d99d6485c14d2375fb4bdd68ca.tar.bz2
aports-cd46eba6f617f9d99d6485c14d2375fb4bdd68ca.tar.xz
main/firefox,xulrunner: upgrade to 10.0.1
Diffstat (limited to 'testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch')
-rw-r--r--testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch67
1 files changed, 0 insertions, 67 deletions
diff --git a/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch b/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
deleted file mode 100644
index 6784b13e74..0000000000
--- a/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 88bb9f90ec1e4b43fb78596c8ff7577c92592eb4 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 25 Nov 2011 08:36:52 +0000
-Subject: [PATCH 3/4] xulrunner: jemalloc aslr
-
----
- memory/jemalloc/jemalloc.c | 33 ++++++++++++++++++++++-----------
- 1 files changed, 22 insertions(+), 11 deletions(-)
-
-diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
-index ad7c450..91de92c 100644
---- a/memory/jemalloc/jemalloc.c
-+++ b/memory/jemalloc/jemalloc.c
-@@ -410,7 +410,7 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
- 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(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
- #define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */
- #endif
-
-@@ -2181,20 +2181,31 @@ pages_map_align(size_t size, int pfd, size_t alignment)
- * 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 MALLOC_PAGEFILE
-- if (pfd != -1) {
-- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
-- MAP_NOSYNC | MAP_ALIGN, pfd, 0);
-- } else
--#endif
-- {
-- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
-- MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
-- }
-+ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE |
-+ MAP_NOSYNC| MAP_ANON, -1, 0);
- assert(ret != NULL);
-
- if (ret == MAP_FAILED)
- ret = NULL;
-+ else {
-+ 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;
-+#ifdef MALLOC_PAGEFILE
-+ if (pfd != -1) {
-+ ret = mmap(ret, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
-+ MAP_NOSYNC | MAP_FIXED, pfd, 0);
-+ }
-+ if (ret == MAP_FAILED)
-+ ret = NULL;
-+#endif
-+ }
- return (ret);
- }
- #endif
---
-1.7.7.4
-