Bug 540929: revert change that disabled page protection on solaris. bug 545295 has addressed issues with page protection on systems that do not use 4k pages (r=edwsmith+)
authorBrent Baker <brbaker@adobe.com>
Thu, 15 Apr 2010 12:00:22 -0400
changeset 4467 5e4b8a042d25190340643fcec6ade3ce0336f93e
parent 4466 13caa279c63a88e698ed9d99270576e597d361e3
child 4468 c0b1c3b5e7c2f7948b8c47e6be7738f952d66f62
push id2334
push userbrbaker@adobe.com
push dateThu, 15 Apr 2010 16:35:57 +0000
reviewersedwsmith
bugs540929, 545295
Bug 540929: revert change that disabled page protection on solaris. bug 545295 has addressed issues with page protection on systems that do not use 4k pages (r=edwsmith+)
shell/avmshell-features.h
--- a/shell/avmshell-features.h
+++ b/shell/avmshell-features.h
@@ -118,28 +118,17 @@
   #ifndef AVMFEATURE_EVAL
     #define AVMFEATURE_EVAL              1
   #endif
 #else
   #define AVMFEATURE_EVAL              0
 #endif
 
 #ifndef AVMFEATURE_PROTECT_JITMEM
-  #if AVMSYSTEM_SPARC
-    // FIXME: bug 540929
-	// sparc systems are known to have 8k page sizes, and gcheap only supports
-	// 4k pages.  Sometimes, GCHeap::AllocCodeMemory returns 4K aligned regions.
-	// VMPI_setPageProtection() is too forgiving, and extends its region to 8k
-	// aligned areas, which later this causes segfaults when data is placed in
-	// the same 8k page as code (randomly).
-	// plan:  GCHeap::AllocCodeMemory must return memory aligned to system page size.
-    #define AVMFEATURE_PROTECT_JITMEM    0
-  #else
-    #define AVMFEATURE_PROTECT_JITMEM    1
-  #endif
+  #define AVMFEATURE_PROTECT_JITMEM    1
 #endif
 
 #ifndef AVMFEATURE_SHARED_GCHEAP
   #define AVMFEATURE_SHARED_GCHEAP     1
 #endif
 
 #ifndef AVMFEATURE_USE_SYSTEM_MALLOC
   #define AVMFEATURE_USE_SYSTEM_MALLOC 0