# HG changeset patch # User Andrew John Hughes # Date 1478843476 0 # Node ID 3f1ac6eef871d52ad36ab957da4821357bdf425f # Parent bb5cee047e34f43a0fe1be1956fa0a4a6d556dc9 PR3134: JamVM is broken due to 2 new native methods in sun.misc.Unsafe (from S8158260) 2016-08-10 Tiago Stuermer Daitx 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. diff -r bb5cee047e34 -r 3f1ac6eef871 ChangeLog --- 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 + + 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 PR3136: CACAO is broken due to 2 new native diff -r bb5cee047e34 -r 3f1ac6eef871 Makefile.am --- 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 diff -r bb5cee047e34 -r 3f1ac6eef871 NEWS --- 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 diff -r bb5cee047e34 -r 3f1ac6eef871 patches/jamvm/pr3134-unsafe_methods.patch --- /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} + }; +