changeset 2902:3f1ac6eef871

PR3134: JamVM is broken due to 2 new native methods in sun.misc.Unsafe (from S8158260) 2016-08-10 Tiago Stuermer Daitx <tdaitx@gmail.com> PR3134: JamVM is broken due to 2 new native methods in sun.misc.Unsafe (from S8158260) * Makefile.am: (ICEDTEA_PATCHES): Add JamVM patch for PR3134. * NEWS: Updated. * patches/jamvm/pr3134-unsafe_methods.patch: Add implementation of isBigEndian0 and unalignedAccess0.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 11 Nov 2016 05:51:16 +0000
parents bb5cee047e34
children f6011021d601
files ChangeLog Makefile.am NEWS patches/jamvm/pr3134-unsafe_methods.patch
diffstat 4 files changed, 50 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 09 18:05:24 2016 +0000
+++ b/ChangeLog	Fri Nov 11 05:51:16 2016 +0000
@@ -1,3 +1,13 @@
+2016-08-10  Tiago Stuermer Daitx  <tdaitx@gmail.com>
+
+	PR3134: JamVM is broken due to 2 new native
+	methods in sun.misc.Unsafe (from S8158260)
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add JamVM patch for PR3134.
+	* NEWS: Updated.
+	* patches/jamvm/pr3134-unsafe_methods.patch:
+	Add implementation of isBigEndian0 and unalignedAccess0.
+
 2016-08-18  Stefan Ring <stefan@complang.tuwien.ac.at>
 
 	PR3136: CACAO is broken due to 2 new native
--- a/Makefile.am	Wed Nov 09 18:05:24 2016 +0000
+++ b/Makefile.am	Fri Nov 11 05:51:16 2016 +0000
@@ -406,7 +406,8 @@
 	patches/jamvm/find_class_from_caller.patch \
 	patches/jamvm/pr2172-tempdir.patch \
 	patches/jamvm/noexecstack.patch \
-	patches/jamvm/pr2665.patch
+	patches/jamvm/pr2665.patch \
+	patches/jamvm/pr3134-unsafe_methods.patch
 endif
 
 if ENABLE_NSS
--- a/NEWS	Wed Nov 09 18:05:24 2016 +0000
+++ b/NEWS	Fri Nov 11 05:51:16 2016 +0000
@@ -63,6 +63,8 @@
   - PR3212: Disable ARM32 JIT by default
 * CACAO
   - PR3136: CACAO is broken due to 2 new native methods in sun.misc.Unsafe (from S8158260)
+* JamVM
+  - PR3134: JamVM is broken due to 2 new native methods in sun.misc.Unsafe (from S8158260)
 * AArch64 port
   - S8167200: AArch64: Broken stack pointer adjustment in interpreter
   - PR3211: AArch64 build fails with pre-compiled headers disabled
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jamvm/pr3134-unsafe_methods.patch	Fri Nov 11 05:51:16 2016 +0000
@@ -0,0 +1,36 @@
+--- jamvm.orig/jamvm/src/classlib/openjdk/natives.c	2014-03-24 21:34:58.000000000 -0300
++++ jamvm/jamvm/src/classlib/openjdk/natives.c	2016-08-09 19:26:36.205775539 -0300
+@@ -34,6 +33,7 @@
+ #include "reflect.h"
+ #include "natives.h"
+ #include "openjdk.h"
++#include "properties.h"
+ #include "trace.h"
+ 
+ int classlibInitialiseNatives() {
+@@ -470,6 +465,16 @@
+     return ostack;
+ }
+ 
++uintptr_t *isBigEndian0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
++    *ostack++ = IS_BIG_ENDIAN;
++    return ostack;
++}
++
++uintptr_t *unalignedAccess0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
++    *ostack++ = FALSE;
++    return ostack;
++}
++
+ VMMethod sun_misc_unsafe[] = {
+     {"registerNatives",        "()V", unsafeRegisterNatives},
+     {"objectFieldOffset",      "(Ljava/lang/reflect/Field;)J",
+@@ -569,6 +574,8 @@
+     {"fullFence",              "()V", fullFence},
+     {"loadFence",              "()V", loadFence},
+     {"storeFence",             "()V", storeFence},
++    {"isBigEndian0",           "()Z", isBigEndian0},
++    {"unalignedAccess0",       "()Z", unalignedAccess0},
+     {NULL,                     NULL, NULL}
+ };
+