Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 349486 Details for
Bug 471622
www-client/firefox on ia64 - Mozilla JS engine needs pointers have their high 17 bits cleared
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Port of 01-fix-map-pages-on-ia64.patch from Stephan Schreiber on Debian
firefox-10.0.11-fix-map-pages-on-ia64.patch (text/plain), 2.26 KB, created by
Émeric Maschino
on 2013-05-28 20:22:13 UTC
(
hide
)
Description:
Port of 01-fix-map-pages-on-ia64.patch from Stephan Schreiber on Debian
Filename:
MIME Type:
Creator:
Émeric Maschino
Created:
2013-05-28 20:22:13 UTC
Size:
2.26 KB
patch
obsolete
>--- a/js/src/jsgcchunk.cpp 2012-12-15 17:19:27.903779696 +0100 >+++ b/js/src/jsgcchunk.cpp 2012-12-15 17:21:29.547785309 +0100 >@@ -236,25 +236,58 @@ MapAlignedPages(size_t size, size_t alig > return p; > } > > # else /* JS_GC_HAS_MAP_ALIGN */ > > static void * > MapPages(void *addr, size_t size) > { >+#if defined(__ia64__) >+ /* >+ * The JS engine assumes that all allocated pointers have their high 17 bits clear, >+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing >+ * mmap an "addr" parameter with those bits clear. The mmap will return that address, >+ * or the nearest available memory above that address, providing a near-guarantee >+ * that those bits are clear. If they are not, we return NULL below to indicate >+ * out-of-memory. >+ * >+ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual >+ * address space. >+ * >+ * See Bug 589735 for more information. >+ */ >+#endif >+ > /* > * We don't use MAP_FIXED here, because it can cause the *replacement* > * of existing mappings, and we only want to create new mappings. > */ >+#if defined(__ia64__) >+ void *p = mmap(addr ? addr : (void*)0x0000070000000000, >+ size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, >+ -1, 0); >+#else > void *p = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, > -1, 0); >+#endif > if (p == MAP_FAILED) > return NULL; >+#if defined(__ia64__) >+ /* >+ * If the caller requested a specific memory location, verify that's what mmap returned. >+ * Otherwise: If the allocated memory doesn't have its upper 17 bits clear, consider it >+ * as out of memory. >+ */ >+ if (addr && p != addr >+ || !addr && ((long long)p & 0xffff800000000000)) { >+#else >+ /* If the caller requested a specific memory location, verify that's what mmap returned. */ > if (addr && p != addr) { >+#endif > /* We succeeded in mapping memory, but not in the right place. */ > JS_ALWAYS_TRUE(munmap(p, size) == 0); > return NULL; > } > return p; > } > > # endif /* !JS_GC_HAS_MAP_ALIGN */ > > >Signed-off-by: Stephan Schreiber <info@fs-driver.org> >Based on a work of Jan Horak <jhorak@redhat.com> >
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 471622
: 349486 |
349488
|
349490