Backed out changeset 10b47593c4d7 (bug 824715)
authorJosh Matthews <josh@joshmatthews.net>
Fri, 28 Dec 2012 19:03:50 -0500
changeset 126304 22e38c3125e9ca2ac7e6e60448fdd8a7e2917e51
parent 126303 e497c2e40dc642cba4bb5df2f116ebf649f1406c
child 126305 6bea4ccff670d9d5c6640b4d8bfddcecef7bbaac
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs824715
milestone20.0a1
backs out10b47593c4d740146d3bcce087bc134ee42b64d5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 10b47593c4d7 (bug 824715)
mozglue/linker/CustomElf.cpp
--- a/mozglue/linker/CustomElf.cpp
+++ b/mozglue/linker/CustomElf.cpp
@@ -434,17 +434,17 @@ CustomElf::LoadSegment(const Phdr *pt_lo
    * of the page p_filesz is in, memory is nulled out.
    * Above the end of that page, and up to p_memsz, we already have nulled out
    * memory because we mapped anonymous memory on the whole library virtual
    * address space. We just need to adjust this anonymous memory protection
    * flags. */
   if (pt_load->p_memsz > pt_load->p_filesz) {
     Addr file_end = pt_load->p_vaddr + pt_load->p_filesz;
     Addr mem_end = pt_load->p_vaddr + pt_load->p_memsz;
-    Addr next_page = (file_end + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
+    Addr next_page = (file_end & ~(PAGE_SIZE - 1)) + PAGE_SIZE;
     if (mem_end > next_page) {
       if (mprotect(GetPtr(next_page), mem_end - next_page, prot) < 0) {
         log("%s: Failed to mprotect", GetPath());
         return false;
       }
     }
   }
   return true;