Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 297447 Details for
Bug 396275
www-client/firefox 9.0 and xpcshell on grsec/pax kernel run into infinite loop doing mmap/munmap, need paxctl -r
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
possible fix for ff9/aslr
ff9-aslr-fix.patch (text/plain), 1.50 KB, created by
PaX Team
on 2011-12-31 13:03:34 UTC
(
hide
)
Description:
possible fix for ff9/aslr
Filename:
MIME Type:
Creator:
PaX Team
Created:
2011-12-31 13:03:34 UTC
Size:
1.50 KB
patch
obsolete
>--- js/src/jsgcchunk.cpp 2011-12-22 17:13:21.000000000 +0000 >+++ js/src/jsgcchunk.cpp 2011-12-22 17:18:31.000000000 +0000 >@@ -213,7 +213,7 @@ > #elif defined(XP_UNIX) > > /* Required on Solaris 10. Might improve performance elsewhere. */ >-# if defined(SOLARIS) && defined(MAP_ALIGN) >+# if (defined(SOLARIS) && defined(MAP_ALIGN)) || defined(MOZ_MEMORY_LINUX) > # define JS_GC_HAS_MAP_ALIGN > > static void * >--- js/src/jsgcchunk.cpp 2011-12-22 17:55:24.000000000 +0000 >+++ js/src/jsgcchunk.cpp 2011-12-22 18:02:24.000000000 +0000 >@@ -226,12 +226,24 @@ > #ifdef SOLARIS > void *p = mmap((caddr_t) alignment, size, PROT_READ | PROT_WRITE, > MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0); >+ if (p == MAP_FAILED) >+ return NULL; > #else >- void *p = mmap((void *) alignment, size, PROT_READ | PROT_WRITE, >- MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0); >-#endif >+ void *p = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, >+ MAP_PRIVATE | MAP_NOSYNC | MAP_ANON, -1, 0); > if (p == MAP_FAILED) > return NULL; >+ uintptr_t aligned_ret; >+ size_t extra_size; >+ >+ aligned_ret = (uintptr_t)p + alignment - 1; >+ aligned_ret &= ~(alignment - 1); >+ extra_size = aligned_ret - (uintptr_t)p; >+ munmap(p, extra_size); >+ munmap(p + extra_size + size, alignment - extra_size); >+ p = (void *)aligned_ret; >+#endif >+ > return p; > }
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 396275
: 297447