~openjdk/openjdk/openjdk7

« back to all changes in this revision

Viewing changes to patches/it-jamvm-8158260-unsafe-methods.patch

  • Committer: Matthias Klose
  • Date: 2016-11-04 18:31:44 UTC
  • Revision ID: doko@ubuntu.com-20161104183144-rpmf99hmjw0z4k5n
  [ Tiago Stürmer Daitx ]
  * Backported security fixes from 8u111:
    - CVE-2016-5568, S8158993: Service Menu services.
    - CVE-2016-5582, S8160591: Improve internal array handling.
    - CVE-2016-5573, S8159519: Reformat JDWP messages.
    - CVE-2016-5597, S8160838: Better HTTP service.
    - CVE-2016-5554, S8157739: Classloader Consistency Checking.
    - CVE-2016-5542, S8155973: Tighten jar checks.
  * debian/rules:
    - removed lcms version 1 option as no current release uses that, lcms2
      is now default.
    - removed in-tree/system lcms selection to always use system's lcms.
    - removed all cacao references except for the transitional cacao package.
    - updated jtreg tests to use othervm.
    - simplified rhino and libcups dependency selection.
  * debian/buildwatch.sh: updated to stop it if no 'make' process is running,
    as it probably means that the build failed - otherwise buildwatch keeps
    the builder alive until it exits after the timer (3 hours by default)
    expires.
  * debian/control.in: removed cacao references.
  * debian/README.source: removed cacao references.
  * debian/patches/cacao-armv4.diff: deleted file.
  * Makefile.am: remove -samevm
  * debian/patches/it-jamvm-8158260-unsafe-methods.patch: fix JAMVM
    after the introduction of two new Unsafe methods in the OpenJDK
    hotspot. Closes: #833933. (LP: #1611598)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
6
 .
 
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
 
14
---
 
15
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 
16
--- /dev/null
 
17
+++ b/patches/jamvm/8158260-fix.patch
 
18
@@ -0,0 +1,36 @@
 
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
 
21
+@@ -34,6 +33,7 @@
 
22
+ #include "reflect.h"
 
23
+ #include "natives.h"
 
24
+ #include "openjdk.h"
 
25
++#include "properties.h"
 
26
+ #include "trace.h"
 
27
 
28
+ int classlibInitialiseNatives() {
 
29
+@@ -470,6 +465,16 @@
 
30
+     return ostack;
 
31
+ }
 
32
 
33
++uintptr_t *isBigEndian0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
 
34
++}
 
35
++
 
36
++uintptr_t *unalignedAccess0(Class *clazz, MethodBlock *mb, uintptr_t *ostack) {
 
37
++}
 
38
++
 
39
+ VMMethod sun_misc_unsafe[] = {
 
40
+     {"registerNatives",        "()V", unsafeRegisterNatives},
 
41
+     {"objectFieldOffset",      "(Ljava/lang/reflect/Field;)J",
 
42
+@@ -569,6 +574,8 @@
 
43
+     {"fullFence",              "()V", fullFence},
 
44
+     {"loadFence",              "()V", loadFence},
 
45
+     {"storeFence",             "()V", storeFence},
 
46
+     {NULL,                     NULL, NULL}
 
47
+ };
 
48
 
49
--- a/Makefile.am
 
50
+++ b/Makefile.am
 
51
@@ -404,7 +404,8 @@ endif
 
52
 if BUILD_JAMVM
 
53
 ICEDTEA_PATCHES += \
 
54
        patches/jamvm/noexecstack.patch \
 
55
-       patches/jamvm/pr2665.patch
 
56
+       patches/jamvm/pr2665.patch \
 
57
+       patches/jamvm/8158260-fix.patch
 
58
 endif
 
59
 
 
60
 if ENABLE_NSS