~openjdk/openjdk/openjdk7

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Description: Adds Unsafe methods from S8158260
 In order to fix the PPC64 bug S8158260 two new native methods were
 added to sun.misc.Unsafe: isBigEndian0 and unalignedAcces0.
 Both were added by the following commit:
 http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/hotspot/rev/4f8cbd54a9c6
 .
 This patch adds those methods to the JAMVM being used by IcedTea.
Author: Tiago Stürmer Daitx <tiago.daitx@canonical.com>
Bug: https://sourceforge.net/p/jamvm/code/merge-requests/1/
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833933
Bug-IcedTea: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3134
Bug-Ubuntu: https://bugs.launchpad.net/openjdk/+bug/1611598
Last-Update: 2016-08-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- /dev/null
+++ b/patches/jamvm/8158260-fix.patch
@@ -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}
+ };
+ 
--- a/Makefile.am
+++ b/Makefile.am
@@ -404,7 +404,8 @@ endif
 if BUILD_JAMVM
 ICEDTEA_PATCHES += \
 	patches/jamvm/noexecstack.patch \
-	patches/jamvm/pr2665.patch
+	patches/jamvm/pr2665.patch \
+	patches/jamvm/8158260-fix.patch
 endif
 
 if ENABLE_NSS