From dbcdac2b6698e87c9dc04dca7621b533a22502b7 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 25 Nov 2011 09:39:13 +0000 Subject: main/xulrunner: upgrade to 8.0.1 --- main/xulrunner/0001-Use-C99-math-isfinite.patch | 39 ---------- main/xulrunner/0001-mozilla-pkgconfig.patch.patch | 83 ++++++++++++++++++++++ main/xulrunner/0002-Use-C99-math-isfinite.patch | 43 +++++++++++ main/xulrunner/0003-xulrunner-jemalloc-aslr.patch | 67 +++++++++++++++++ .../0004-xulrunner-malloc_usable_size.patch | 25 +++++++ main/xulrunner/APKBUILD | 30 ++++---- main/xulrunner/mozilla-pkgconfig.patch | 60 ---------------- main/xulrunner/mozjs-c99math.patch | 26 ------- main/xulrunner/xpcom-c99math.patch | 15 ---- main/xulrunner/xulrunner-jemalloc-aslr.patch | 54 -------------- 10 files changed, 231 insertions(+), 211 deletions(-) delete mode 100644 main/xulrunner/0001-Use-C99-math-isfinite.patch create mode 100644 main/xulrunner/0001-mozilla-pkgconfig.patch.patch create mode 100644 main/xulrunner/0002-Use-C99-math-isfinite.patch create mode 100644 main/xulrunner/0003-xulrunner-jemalloc-aslr.patch create mode 100644 main/xulrunner/0004-xulrunner-malloc_usable_size.patch delete mode 100644 main/xulrunner/mozilla-pkgconfig.patch delete mode 100644 main/xulrunner/mozjs-c99math.patch delete mode 100644 main/xulrunner/xpcom-c99math.patch delete mode 100644 main/xulrunner/xulrunner-jemalloc-aslr.patch (limited to 'main') diff --git a/main/xulrunner/0001-Use-C99-math-isfinite.patch b/main/xulrunner/0001-Use-C99-math-isfinite.patch deleted file mode 100644 index b9ead9117c..0000000000 --- a/main/xulrunner/0001-Use-C99-math-isfinite.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f7c52ff6334ce158da23750e63655df41e73fc31 Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Mon, 15 Aug 2011 07:57:16 +0000 -Subject: [PATCH] Use C99 math isfinite - ---- - content/base/public/nsContentUtils.h | 2 +- - js/src/ctypes/CTypes.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h -index a69d4ef..b4d8e67 100644 ---- a/content/base/public/nsContentUtils.h -+++ b/content/base/public/nsContentUtils.h -@@ -1994,7 +1994,7 @@ inline NS_HIDDEN_(PRBool) NS_FloatIsFinite(jsdouble f) { - #ifdef WIN32 - return _finite(f); - #else -- return finite(f); -+ return isfinite(f); - #endif - } - -diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp -index 0644817..5dbb906 100644 ---- a/js/src/ctypes/CTypes.cpp -+++ b/js/src/ctypes/CTypes.cpp -@@ -467,7 +467,7 @@ static inline bool FloatIsFinite(jsdouble f) { - #ifdef WIN32 - return _finite(f) != 0; - #else -- return finite(f); -+ return isfinite(f); - #endif - } - --- -1.7.6 - diff --git a/main/xulrunner/0001-mozilla-pkgconfig.patch.patch b/main/xulrunner/0001-mozilla-pkgconfig.patch.patch new file mode 100644 index 0000000000..b8beae40f6 --- /dev/null +++ b/main/xulrunner/0001-mozilla-pkgconfig.patch.patch @@ -0,0 +1,83 @@ +From f00f666955c2e4053e0cff90f787dc5b980bcb18 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Fri, 25 Nov 2011 08:23:35 +0000 +Subject: [PATCH 1/4] mozilla-pkgconfig.patch + +--- + xulrunner/installer/Makefile.in | 1 + + xulrunner/installer/libxul-embedding.pc.in | 1 + + xulrunner/installer/libxul.pc.in | 1 + + .../installer/mozilla-gtkmozembed-embedding.pc.in | 1 + + xulrunner/installer/mozilla-gtkmozembed.pc.in | 1 + + xulrunner/installer/mozilla-js.pc.in | 2 +- + 6 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in +index 35febf9..38d854d 100644 +--- a/xulrunner/installer/Makefile.in ++++ b/xulrunner/installer/Makefile.in +@@ -110,6 +110,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ +diff --git a/xulrunner/installer/libxul-embedding.pc.in b/xulrunner/installer/libxul-embedding.pc.in +index 100e0a7..97b7cb4 100644 +--- a/xulrunner/installer/libxul-embedding.pc.in ++++ b/xulrunner/installer/libxul-embedding.pc.in +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib -lxpcomglue -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff --git a/xulrunner/installer/libxul.pc.in b/xulrunner/installer/libxul.pc.in +index ccce9aa..92e8502 100644 +--- a/xulrunner/installer/libxul.pc.in ++++ b/xulrunner/installer/libxul.pc.in +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + idldir=%idldir% + +diff --git a/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in b/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +index 03bd646..4d2b62d 100644 +--- a/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ++++ b/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz +diff --git a/xulrunner/installer/mozilla-gtkmozembed.pc.in b/xulrunner/installer/mozilla-gtkmozembed.pc.in +index a25c05e..cd0d600 100644 +--- a/xulrunner/installer/mozilla-gtkmozembed.pc.in ++++ b/xulrunner/installer/mozilla-gtkmozembed.pc.in +@@ -1,5 +1,6 @@ + prefix=%prefix% + sdkdir=%sdkdir% ++libdir=%libdir% + includedir=%includedir% + + Name: mozilla-gtkembedmoz +diff --git a/xulrunner/installer/mozilla-js.pc.in b/xulrunner/installer/mozilla-js.pc.in +index c1428f1..a528ef1 100644 +--- a/xulrunner/installer/mozilla-js.pc.in ++++ b/xulrunner/installer/mozilla-js.pc.in +@@ -7,4 +7,4 @@ Description: The Mozilla JavaScript Library + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib %MOZ_JS_LINK% +-Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE ++Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE +-- +1.7.7.4 + diff --git a/main/xulrunner/0002-Use-C99-math-isfinite.patch b/main/xulrunner/0002-Use-C99-math-isfinite.patch new file mode 100644 index 0000000000..3d85a69288 --- /dev/null +++ b/main/xulrunner/0002-Use-C99-math-isfinite.patch @@ -0,0 +1,43 @@ +From cdb9db4c1c593dbe22db4f389a62fce034f31f2d Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Fri, 25 Nov 2011 08:30:51 +0000 +Subject: [PATCH 2/4] Use C99 math isfinite + +--- + js/src/ctypes/CTypes.cpp | 2 +- + xpcom/ds/nsMathUtils.h | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp +index 5c0f886..a3b1ae6 100644 +--- a/js/src/ctypes/CTypes.cpp ++++ b/js/src/ctypes/CTypes.cpp +@@ -467,7 +467,7 @@ static inline bool FloatIsFinite(jsdouble f) { + #ifdef WIN32 + return _finite(f) != 0; + #else +- return finite(f); ++ return isfinite(f); + #endif + } + +diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h +index 21ffbec..2e80476 100644 +--- a/xpcom/ds/nsMathUtils.h ++++ b/xpcom/ds/nsMathUtils.h +@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d) + // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800. + return !!_finite(d); + #else +- return finite(d); ++#ifdef _GLIBCXX_CMATH ++ return std::isfinite(d); ++#else ++ return isfinite(d); ++#endif + #endif + } + +-- +1.7.7.4 + diff --git a/main/xulrunner/0003-xulrunner-jemalloc-aslr.patch b/main/xulrunner/0003-xulrunner-jemalloc-aslr.patch new file mode 100644 index 0000000000..6784b13e74 --- /dev/null +++ b/main/xulrunner/0003-xulrunner-jemalloc-aslr.patch @@ -0,0 +1,67 @@ +From 88bb9f90ec1e4b43fb78596c8ff7577c92592eb4 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +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 + diff --git a/main/xulrunner/0004-xulrunner-malloc_usable_size.patch b/main/xulrunner/0004-xulrunner-malloc_usable_size.patch new file mode 100644 index 0000000000..aae416c7da --- /dev/null +++ b/main/xulrunner/0004-xulrunner-malloc_usable_size.patch @@ -0,0 +1,25 @@ +From a2a15c826a5e1743ba71288543b9e144603fba26 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Fri, 25 Nov 2011 08:40:53 +0000 +Subject: [PATCH 4/4] xulrunner: malloc_usable_size + +--- + memory/mozalloc/mozalloc.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp +index 58e5192..500c651 100644 +--- a/memory/mozalloc/mozalloc.cpp ++++ b/memory/mozalloc/mozalloc.cpp +@@ -267,7 +267,7 @@ moz_malloc_usable_size(void *ptr) + #if defined(XP_MACOSX) + return malloc_size(ptr); + #elif defined(MOZ_MEMORY) +- return malloc_usable_size(ptr); ++ return 0; + #elif defined(XP_WIN) + return _msize(ptr); + #else +-- +1.7.7.4 + diff --git a/main/xulrunner/APKBUILD b/main/xulrunner/APKBUILD index 1967187e55..23c794b1c0 100644 --- a/main/xulrunner/APKBUILD +++ b/main/xulrunner/APKBUILD @@ -1,9 +1,9 @@ # Contributor: William Pitcock # Maintainer: William Pitcock pkgname=xulrunner -pkgver=7.0.1 -_ffoxver=7.0.1 -pkgrel=3 +pkgver=8.0.1 +_ffoxver=8.0.1 +pkgrel=0 pkgdesc="runtime environment for xul-based applications" url="http://developer.mozilla.org/en/XULRunner" arch="all" @@ -46,16 +46,13 @@ subpackages="$pkgname-dev" source="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2 mozconfig - - mozilla-pkgconfig.patch - - xulrunner-jemalloc-aslr.patch - xulrunner-mozalloc.patch - - mozjs-c99math.patch - xpcom-c99math.patch + 0001-mozilla-pkgconfig.patch.patch + 0002-Use-C99-math-isfinite.patch + 0003-xulrunner-jemalloc-aslr.patch + 0004-xulrunner-malloc_usable_size.patch " +# xulrunner-mozalloc.patch _builddir="${srcdir}/mozilla-release" prepare() { local i @@ -107,10 +104,9 @@ dev() { mv "${pkgdir}"/usr/include "${subpkgdir}"/usr/include } -md5sums="5b212db48630ba93bb30ec63cca17f4d firefox-7.0.1.source.tar.bz2 +md5sums="b7d09b082e88a74860a51a8e04e29333 firefox-8.0.1.source.tar.bz2 cc43a2bd96bd2395aa72d0bbb88e5594 mozconfig -02c23dc4ebd88e445533314716331818 mozilla-pkgconfig.patch -30053b8b5811cc0676bfe7d7d7ffaa4a xulrunner-jemalloc-aslr.patch -d38ecbb7bb31032d3e1ced8939e26abd xulrunner-mozalloc.patch -abbef7f783ad5d99a9cdbf9e358fafcd mozjs-c99math.patch -68709c9aad5b7e46e63787fc648d7ae7 xpcom-c99math.patch" +731ec4084e57eb05e93000c971aad0d4 0001-mozilla-pkgconfig.patch.patch +1867db217d10722675c88b655db8c2d7 0002-Use-C99-math-isfinite.patch +7faa279d64c9ec2e7abc7c0497c7e07e 0003-xulrunner-jemalloc-aslr.patch +7cf18be3ada3eed5856fbab24219126d 0004-xulrunner-malloc_usable_size.patch" diff --git a/main/xulrunner/mozilla-pkgconfig.patch b/main/xulrunner/mozilla-pkgconfig.patch deleted file mode 100644 index 5c8bd0fd6e..0000000000 --- a/main/xulrunner/mozilla-pkgconfig.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/libxul-embedding.pc.in mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in ---- mozilla-1.9.2.orig/xulrunner/installer/libxul-embedding.pc.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in 2010-01-21 22:27:17.000000000 +0200 -@@ -6,5 +6,6 @@ - Name: libxul-embedding - Description: Static library for version-independent embedding of the Mozilla runtime - Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% - Libs: -L${sdkdir}/lib -lxpcomglue -ldl - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/libxul.pc.in mozilla-1.9.2/xulrunner/installer/libxul.pc.in ---- mozilla-1.9.2.orig/xulrunner/installer/libxul.pc.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/libxul.pc.in 2010-01-21 22:27:56.000000000 +0200 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - idldir=%idldir% - -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/Makefile.in mozilla-1.9.2/xulrunner/installer/Makefile.in ---- mozilla-1.9.2.orig/xulrunner/installer/Makefile.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/Makefile.in 2010-01-21 22:25:04.000000000 +0200 -@@ -121,6 +121,7 @@ - -e "s|%includedir%|$(includedir)|" \ - -e "s|%idldir%|$(idldir)|" \ - -e "s|%sdkdir%|$(sdkdir)|" \ -+ -e "s|%libdir%|$(installdir)|" \ - -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ - -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ - -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-01-21 22:28:15.000000000 +0200 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-01-21 22:28:27.000000000 +0200 -@@ -1,5 +1,6 @@ - prefix=%prefix% - sdkdir=%sdkdir% -+libdir=%libdir% - includedir=%includedir% - - Name: mozilla-gtkembedmoz -diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-js.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-js.pc.in ---- mozilla-1.9.2.orig/xulrunner/installer/mozilla-js.pc.in 2010-01-21 05:31:27.000000000 +0200 -+++ mozilla-1.9.2/xulrunner/installer/mozilla-js.pc.in 2010-01-21 22:29:30.000000000 +0200 -@@ -7,4 +7,4 @@ - Version: %MOZILLA_VERSION% - Requires: %NSPR_NAME% >= %NSPR_VERSION% - Libs: -L${sdkdir}/lib %MOZ_JS_LINK% --Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE -+Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE diff --git a/main/xulrunner/mozjs-c99math.patch b/main/xulrunner/mozjs-c99math.patch deleted file mode 100644 index a4f81b62c7..0000000000 --- a/main/xulrunner/mozjs-c99math.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- mozilla-2.0.orig/js/src/ctypes/CTypes.cpp -+++ mozilla-2.0/js/src/ctypes/CTypes.cpp -@@ -464,7 +464,7 @@ - #ifdef WIN32 - return _finite(f) != 0; - #else -- return finite(f); -+ return isfinite(f); - #endif - } - ---- ./content/base/public/nsContentUtils.h.orig -+++ ./content/base/public/nsContentUtils.h -@@ -1994,7 +1994,11 @@ - #ifdef WIN32 - return _finite(f); - #else -- return finite(f); -+#ifdef _GLIBCXX_CMATH -+ return std::isfinite(f); -+#else -+ return isfinite(f); -+#endif - #endif - } - diff --git a/main/xulrunner/xpcom-c99math.patch b/main/xulrunner/xpcom-c99math.patch deleted file mode 100644 index 3222c7f206..0000000000 --- a/main/xulrunner/xpcom-c99math.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- ./xpcom/ds/nsMathUtils.h.orig -+++ ./xpcom/ds/nsMathUtils.h -@@ -151,7 +151,11 @@ - // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800. - return !!_finite(d); - #else -- return finite(d); -+#ifdef _GLIBCXX_CMATH -+ return std::isfinite(d); -+#else -+ return isfinite(d); -+#endif - #endif - } - diff --git a/main/xulrunner/xulrunner-jemalloc-aslr.patch b/main/xulrunner/xulrunner-jemalloc-aslr.patch deleted file mode 100644 index 4a1579649d..0000000000 --- a/main/xulrunner/xulrunner-jemalloc-aslr.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -r 9259fdc3570c memory/jemalloc/jemalloc.c ---- a/memory/jemalloc/jemalloc.c Wed Jan 27 16:20:05 2010 -0800 -+++ b/memory/jemalloc/jemalloc.c Wed Jan 27 23:03:56 2010 -0600 -@@ -373,7 +373,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(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD) - #define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */ - #endif - -@@ -2178,20 +2178,31 @@ - * 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 -- cgit v1.2.3