Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions srcpkgs/openjdk8/files/musl_005_jdk.patch

This file was deleted.

7 changes: 3 additions & 4 deletions srcpkgs/openjdk8/patches/001_8041658.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
8041658: Use of -fdevirtualize on macroAssembler_x86.o (via -O2) with gcc 4.9.0 creates broken VM
Summary: -fno-devirtualize should be passed when compiling this file.

diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2017-04-20 14:31:49.000000000 +0100
+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2017-05-10 14:52:39.297377302 +0100
@@ -259,6 +259,9 @@
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -275,6 +275,9 @@ else
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
endif
Expand Down
105 changes: 47 additions & 58 deletions srcpkgs/openjdk8/patches/002_8043780-pr3368.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
Summary: Use open(O_CLOEXEC) where available; fall back to FD_CLOEXEC when necessary
Reviewed-by: rasbold, dholmes

diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
@@ -5282,38 +5282,16 @@
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -5593,11 +5593,41 @@ int os::open(const char *path, int oflag
errno = ENAMETOOLONG;
return -1;
}
Expand All @@ -20,47 +19,28 @@ diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
oflag = oflag & ~O_DELETE;

- fd = ::open64(path, oflag, mode);
- if (fd == -1) return -1;
-
- //If the open succeeded, the file might still be a directory
- {
- struct stat64 buf64;
- int ret = ::fstat64(fd, &buf64);
- int st_mode = buf64.st_mode;
-
- if (ret != -1) {
- if ((st_mode & S_IFMT) == S_IFDIR) {
- errno = EISDIR;
- ::close(fd);
- return -1;
- }
- } else {
- ::close(fd);
- return -1;
- }
- }
-
- /*
- * All file descriptors that are opened in the JVM and not
- * specifically destined for a subprocess should have the
- * close-on-exec flag set. If we don't set it, then careless 3rd
- * party native code might fork and exec without closing all
- * appropriate file descriptors (e.g. as we do in closeDescriptors in
- * UNIXProcess.c), and this in turn might:
+
+ /* All file descriptors that are opened in the Java process and not
+ * specifically destined for a subprocess should have the close-on-exec
+ * flag set. If we don't set it, then careless 3rd party native code
+ * might fork and exec without closing all appropriate file descriptors
+ * (e.g. as we do in closeDescriptors in UNIXProcess.c), and this in
+ * turn might:
*
* - cause end-of-file to fail to be detected on some file
* descriptors, resulting in mysterious hangs, or
@@ -5329,12 +5307,49 @@
* 4843136: (process) pipe file descriptor from Runtime.exec not being closed
* 6339493: (process) Runtime.exec does not close all file descriptors on Solaris 9
*/
+ *
+ * - cause end-of-file to fail to be detected on some file
+ * descriptors, resulting in mysterious hangs, or
+ *
+ * - might cause an fopen in the subprocess to fail on a system
+ * suffering from bug 1085341.
+ *
+ * (Yes, the default setting of the close-on-exec flag is a Unix
+ * design flaw)
+ *
+ * See:
+ * 1085341: 32-bit stdio routines should support file descriptors >255
+ * 4843136: (process) pipe file descriptor from Runtime.exec not being closed
+ * 6339493: (process) Runtime.exec does not close all file descriptors on Solaris 9
+ */
+ // Modern Linux kernels (after 2.6.23 2007) support O_CLOEXEC with open().
+ // O_CLOEXEC is preferable to using FD_CLOEXEC on an open file descriptor
+ // because it saves a system call and removes a small window where the flag
Expand All @@ -71,26 +51,35 @@ diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
+#endif
+
+ int fd = ::open64(path, oflag, mode);
+ if (fd == -1) return -1;
+
+ //If the open succeeded, the file might still be a directory
+ {
+ struct stat64 buf64;
+ int ret = ::fstat64(fd, &buf64);
+ int st_mode = buf64.st_mode;
+
+ if (ret != -1) {
+ if ((st_mode & S_IFMT) == S_IFDIR) {
+ errno = EISDIR;
+ ::close(fd);
+ return -1;
+ }
+ } else {
+ ::close(fd);
+ return -1;
+ }
+ }
+
if (fd == -1) return -1;

//If the open succeeded, the file might still be a directory
@@ -5618,34 +5648,19 @@ int os::open(const char *path, int oflag
}
}

- /*
- * All file descriptors that are opened in the JVM and not
- * specifically destined for a subprocess should have the
- * close-on-exec flag set. If we don't set it, then careless 3rd
- * party native code might fork and exec without closing all
- * appropriate file descriptors (e.g. as we do in closeDescriptors in
- * UNIXProcess.c), and this in turn might:
- *
- * - cause end-of-file to fail to be detected on some file
- * descriptors, resulting in mysterious hangs, or
- *
- * - might cause an fopen in the subprocess to fail on a system
- * suffering from bug 1085341.
- *
- * (Yes, the default setting of the close-on-exec flag is a Unix
- * design flaw)
- *
- * See:
- * 1085341: 32-bit stdio routines should support file descriptors >255
- * 4843136: (process) pipe file descriptor from Runtime.exec not being closed
- * 6339493: (process) Runtime.exec does not close all file descriptors on Solaris 9
- */
#ifdef FD_CLOEXEC
- {
- int flags = ::fcntl(fd, F_GETFD);
Expand Down
7 changes: 3 additions & 4 deletions srcpkgs/openjdk8/patches/003_8078504-pr3094.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
S8078504, PR3094: Zero fails to build
Reviewed-by: kvn, simonis

diff --git openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.hpp openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.hpp
--- openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.hpp
+++ openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.hpp
--- a/hotspot/src/cpu/zero/vm/vm_version_zero.hpp
+++ b/hotspot/src/cpu/zero/vm/vm_version_zero.hpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
Expand All @@ -18,7 +17,7 @@ diff --git openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.hpp openjdk/hots
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
@@ -34,6 +34,7 @@ class VM_Version : public Abstract_VM_Ve
static const char* cpu_features() {
return "";
}
Expand Down
7 changes: 3 additions & 4 deletions srcpkgs/openjdk8/patches/004_8087218-pr2740.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
8087218, PR2740: Constant fold loads from final instance fields in VM anonymous classes
Reviewed-by: jrose, rbackman

diff -Nru openjdk.orig/hotspot/src/share/vm/ci/ciField.cpp openjdk/hotspot/src/share/vm/ci/ciField.cpp
--- openjdk.orig/hotspot/src/share/vm/ci/ciField.cpp 2017-04-20 14:31:49.000000000 +0100
+++ openjdk/hotspot/src/share/vm/ci/ciField.cpp 2017-05-10 14:55:11.722924914 +0100
@@ -187,6 +187,10 @@
--- a/hotspot/src/share/vm/ci/ciField.cpp
+++ b/hotspot/src/share/vm/ci/ciField.cpp
@@ -187,6 +187,10 @@ static bool trust_final_non_static_field
// Even if general trusting is disabled, trust system-built closures in these packages.
if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke"))
return true;
Expand Down
57 changes: 25 additions & 32 deletions srcpkgs/openjdk8/patches/005_8158260-pr2991-rh1341258.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ Summary: Adjust instruction generation. Includes portions of 8026049 for test ca
Reviewed-by: goetz
Contributed-by: gromero@linux.vnet.ibm.com, horii@jp.ibm.com

diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
--- openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2019-01-25 13:46:51.799453897 +0000
@@ -201,6 +201,11 @@
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
@@ -236,6 +236,11 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseSHA, false);
}

+ // This machine allows unaligned memory accesses
Expand All @@ -24,10 +23,9 @@ diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp openjdk/hotspot
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
UseMontgomeryMultiplyIntrinsic = true;
}
diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
--- openjdk.orig/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp 2019-01-25 13:46:51.799453897 +0000
@@ -375,6 +375,13 @@
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -386,6 +386,13 @@ void VM_Version::initialize() {
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;

Expand All @@ -41,10 +39,9 @@ diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp openjdk/hot
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/vm_version_x86.cpp openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
--- openjdk.orig/hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2019-01-25 13:46:51.799453897 +0000
@@ -1033,6 +1033,11 @@
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
@@ -1045,6 +1045,11 @@ void VM_Version::get_processor_features(
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;

Expand All @@ -56,9 +53,8 @@ diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/vm_version_x86.cpp openjdk/hotspot
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
tty->print_cr("Logical CPUs per core: %u",
diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.cpp openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.cpp
--- openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2019-01-25 13:46:51.799453897 +0000
--- a/hotspot/src/cpu/zero/vm/vm_version_zero.cpp
+++ b/hotspot/src/cpu/zero/vm/vm_version_zero.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
Expand All @@ -79,10 +75,9 @@ diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.cpp openjdk/hotsp
+ FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
+ }
+}
diff -Nru openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src/share/vm/prims/unsafe.cpp
--- openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-25 13:50:10.160334728 +0000
@@ -385,6 +385,24 @@
--- a/hotspot/src/share/vm/prims/unsafe.cpp
+++ b/hotspot/src/share/vm/prims/unsafe.cpp
@@ -402,6 +402,24 @@ UNSAFE_END

#endif // not SUPPORTS_NATIVE_CX8

Expand All @@ -107,7 +102,7 @@ diff -Nru openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src
#define DEFINE_GETSETOOP(jboolean, Boolean) \
\
UNSAFE_ENTRY(jboolean, Unsafe_Get##Boolean##140(JNIEnv *env, jobject unsafe, jobject obj, jint offset)) \
@@ -1716,6 +1734,11 @@
@@ -1722,6 +1740,11 @@ JNINativeMethod fence_methods[] = {
{CC "fullFence", CC "()V", FN_PTR(Unsafe_FullFence)},
};

Expand All @@ -119,7 +114,7 @@ diff -Nru openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src
#undef CC
#undef FN_PTR

@@ -1815,5 +1838,8 @@
@@ -1821,5 +1844,8 @@ JVM_ENTRY(void, JVM_RegisterUnsafeMethod

// Fence methods
register_natives("1.8 fence methods", env, unsafecls, fence_methods, sizeof(fence_methods)/sizeof(JNINativeMethod));
Expand All @@ -128,22 +123,20 @@ diff -Nru openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src
+ register_natives("1.9 CPU methods", env, unsafecls, cpu_methods, sizeof(cpu_methods)/sizeof(JNINativeMethod));
}
JVM_END
diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2019-01-25 13:46:51.803453833 +0000
@@ -4003,6 +4003,9 @@
product(bool, UseLockedTracing, false, \
"Use locked-tracing when doing event-based tracing") \
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -4013,6 +4013,9 @@ class CommandLineFlags {
"Allocation less than this value will be allocated " \
"using malloc. Larger allocations will use mmap.") \
\
+ diagnostic(bool, UseUnalignedAccesses, false, \
+ "Use unaligned memory accesses in sun.misc.Unsafe") \
+ \
product_pd(bool, PreserveFramePointer, \
"Use the FP register for holding the frame pointer " \
"and not as a general purpose register.")
diff -Nru openjdk.orig/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java openjdk/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java
--- openjdk.orig/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java 1970-01-01 01:00:00.000000000 +0100
+++ openjdk/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java 2019-01-25 13:46:51.803453833 +0000
"and not as a general purpose register.") \
--- /dev/null
+++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2016 SAP SE. All rights reserved.
Expand Down
7 changes: 3 additions & 4 deletions srcpkgs/openjdk8/patches/007_8207057-pr3613.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
# Parent 2f2d2af6fa5c44e67e0a9987f56392315a1e4b64
8207057, PR3613: No debug info for assembler files

diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2018-12-21 00:55:33.407545727 +0000
+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2018-12-21 01:14:40.357592769 +0000
@@ -339,6 +339,7 @@
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -355,6 +355,7 @@ endif
# DEBUG_BINARIES uses full -g debug information for all configs
ifeq ($(DEBUG_BINARIES), true)
CFLAGS += -g
Expand Down
Loading
Loading