1
Description: Adds Unsafe methods from S8158260
2
In order to fix the PPC64 bug S8158260 two new native methods were
3
added to sun.misc.Unsafe: isBigEndian0 and unalignedAcces0.
4
Both were added by the following commit:
5
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot/rev/4f8cbd54a9c6
7
This patch adds those methods to the JAMVM being used by IcedTea.
8
Author: Tiago Stürmer Daitx <tiago.daitx@canonical.com>
9
Bug: https://sourceforge.net/p/jamvm/code/merge-requests/1/
10
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833933
11
Bug-IcedTea: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3134
12
Bug-Ubuntu: https://bugs.launchpad.net/openjdk/+bug/1611598
13
Last-Update: 2016-08-09
15
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
17
+++ b/patches/jamvm/8158260-fix.patch
19
+--- jamvm.orig/jamvm/src/classlib/openjdk/natives.c 2014-03-24 21:34:58.000000000 -0300
20
++++ jamvm/jamvm/src/classlib/openjdk/natives.c 2016-08-09 19:26:36.205775539 -0300
22
+ #include "reflect.h"
23
+ #include "natives.h"
24
+ #include "openjdk.h"
25
++#include "properties.h"
28
+ int classlibInitialiseNatives() {
33
++uintptr_t *isBigEndian0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
36
++uintptr_t *unalignedAccess0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
39
+ VMMethod sun_misc_unsafe[] = {
40
+ {"registerNatives", "()V", unsafeRegisterNatives},
41
+ {"objectFieldOffset", "(Ljava/lang/reflect/Field;)J",
43
+ {"fullFence", "()V", fullFence},
44
+ {"loadFence", "()V", loadFence},
45
+ {"storeFence", "()V", storeFence},
51
@@ -404,7 +404,8 @@ endif
54
patches/jamvm/noexecstack.patch \
55
- patches/jamvm/pr2665.patch
56
+ patches/jamvm/pr2665.patch \
57
+ patches/jamvm/8158260-fix.patch