changeset 1846:166d329b827d

2009-05-29 Matthias Klose <doko@ubuntu.com> * patches/icedtea-cacao-no-mmap-first-page.patch: New. * Makefile.am (ICEDTEA_PATCHES): Apply above patch. * HACKING: Update.
author doko@ubuntu.com
date Fri, 29 May 2009 10:07:12 +0200
parents 331c91ed45cd
children b65dc786ec65
files ChangeLog HACKING Makefile.am patches/cacao/no-mmap-first-page.patch
diffstat 4 files changed, 32 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu May 28 19:33:39 2009 +0100
+++ b/ChangeLog	Fri May 29 10:07:12 2009 +0200
@@ -1,3 +1,9 @@
+2009-05-29  Matthias Klose  <doko@ubuntu.com>
+
+	* patches/icedtea-cacao-no-mmap-first-page.patch: New.
+	* Makefile.am (ICEDTEA_PATCHES): Apply above patch.
+	* HACKING: Update.
+
 2009-05-27  Andrew John Hughes  <ahughes@redhat.com>
 
 	* patches/ecj/icedtea.patch:
--- a/HACKING	Thu May 28 19:33:39 2009 +0100
+++ b/HACKING	Fri May 29 10:07:12 2009 +0200
@@ -72,6 +72,7 @@
 * icedtea-includedb.patch: Add missing include files. (S6793825, mostly applied in b47)
 * icedtea-xml-encodinginfo.patch: Fix possible StackOverflowError in EncodingInfo (PR295).
 * cacao/launcher.patch: For the 'java' command, create new thread depending on the current VM.
+* icedtea-cacao-no-mmap-first-page.patch: Don't mmap the first memory page.
 
 The following patches are only applied to OpenJDK6 in IcedTea6:
 
--- a/Makefile.am	Thu May 28 19:33:39 2009 +0100
+++ b/Makefile.am	Fri May 29 10:07:12 2009 +0200
@@ -2084,7 +2084,8 @@
 
 if BUILD_CACAO
 ICEDTEA_PATCHES += \
-	patches/cacao/launcher.patch
+	patches/cacao/launcher.patch \
+	patches/cacao/no-mmap-first-page.patch
 endif
 
 if WITH_CACAO
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/no-mmap-first-page.patch	Fri May 29 10:07:12 2009 +0200
@@ -0,0 +1,23 @@
+--- cacao/cacao/src/vm/jit/trap.c.orig	2008-07-07 13:36:19.000000000 +0200
++++ cacao/cacao/src/vm/jit/trap.c	2008-07-23 10:45:30.480113152 +0200
+@@ -59,20 +59,6 @@
+  */
+ void trap_init(void)
+ {
+-#if !(defined(__ARM__) && defined(__LINUX__))
+-	/* On arm-linux the first memory page can't be mmap'ed, as it
+-	   contains the exception vectors. */
+-
+-	int pagesize;
+-
+-	/* mmap a memory page at address 0x0, so our hardware-exceptions
+-	   work. */
+-
+-	pagesize = system_getpagesize();
+-
+-	(void) system_mmap_anonymous(NULL, pagesize, PROT_NONE, MAP_PRIVATE | MAP_FIXED);
+-#endif
+-
+ 	TRACESUBSYSTEMINITIALIZATION("trap_init");
+ 
+ #if !defined(TRAP_INSTRUCTION_IS_LOAD)