Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 200840 Details for
Bug 278698
>=www-client/mozilla-firefox-3.5 incompatible with PaX RANDMMAP on amd64
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix jemalloc vs. ASLR
300-xulrunner-fix-jemalloc-vs-aslr.patch (text/plain), 1.90 KB, created by
PaX Team
on 2009-08-10 13:23:40 UTC
(
hide
)
Description:
fix jemalloc vs. ASLR
Filename:
MIME Type:
Creator:
PaX Team
Created:
2009-08-10 13:23:40 UTC
Size:
1.90 KB
patch
obsolete
>diff -urpx 'cscope*' -x '.*.swp' mozilla-1.9.1-orig/memory/jemalloc/jemalloc.c mozilla-1.9.1/memory/jemalloc/jemalloc.c >--- mozilla-1.9.1-orig/memory/jemalloc/jemalloc.c 2009-07-30 17:30:25.000000000 +0200 >+++ mozilla-1.9.1/memory/jemalloc/jemalloc.c 2009-08-10 14:28:59.000000000 +0200 >@@ -392,7 +392,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib > 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 > >@@ -2305,20 +2305,31 @@ pages_map_align(size_t size, int pfd, si > * 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278698
:
199354
|
199358
|
199360
| 200840