aports/community/openjdk8/icedtea-hotspot-musl.patch
Timo Teräs 85cf3a2347 community/openjdk8: upgrade to icedtea 3.5.0 / java 8 u141 b15
fixes #7579

S8163958, CVE-2017-10102: Improved garbage collection
S8167228: Update to libpng 1.6.28
S8169209, CVE-2017-10053: Improved image post-processing steps
S8169392, CVE-2017-10067: Additional jar validation steps
S8170966, CVE-2017-10081: Right parenthesis issue
S8171539, CVE-2017-10078: Better script accessibility for JavaScript
S8172204, CVE-2017-10087: Better Thread Pool execution
S8172461, CVE-2017-10089: Service Registration Lifecycle
S8172465, CVE-2017-10090: Better handling of channel groups
S8172469, CVE-2017-10096: Transform Transformer Exceptions
S8173286, CVE-2017-10101: Better reading of text catalogs
S8173697, CVE-2017-10107: Less Active Activations
S8173770, CVE-2017-10074: Image conversion improvements
S8174098, CVE-2017-10110: Better image fetching
S8174105, CVE-2017-10108: Better naming attribution
S8174113, CVE-2017-10109: Better sourcing of code
S8174770: Check registry registration location
S8174873: Improved certificate procesing
S8175106, CVE-2017-10115: Higher quality DSA operations
S8175110, CVE-2017-10118: Higher quality ECDSA operations
S8176055: JMX diagnostic improvements
S8176067, CVE-2017-10116: Proper directory lookup processing
S8176760, CVE-2017-10135: Better handling of PKCS8 material
S8178135, CVE-2017-10176: Additional elliptic curve support
S8179101, CVE-2017-10193: Improve algorithm constraints implementation
S8179998, CVE-2017-10198: Clear certificate chain connections
S8181420, CVE-2017-10074: PPC: Image conversion improvements
S8183551, CVE-2017-10074, PR3423: AArch64: Image conversion improvements
S8184185, CVE-2017-10111: Rearrange MethodHandle arrangements
2017-07-21 15:34:40 +00:00

136 lines
5.3 KiB
Diff

diff --git icedtea/hotspot/src/os/linux/vm/jvm_linux.cpp icedtea/hotspot/src/os/linux/vm/jvm_linux.cpp
index ba84788..c22281f 100644
--- openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
@@ -154,7 +154,9 @@ struct siglabel siglabels[] = {
#ifdef SIGSTKFLT
"STKFLT", SIGSTKFLT, /* Stack fault. */
#endif
+#ifdef SIGCLD
"CLD", SIGCLD, /* Same as SIGCHLD (System V). */
+#endif
"CHLD", SIGCHLD, /* Child status has changed (POSIX). */
"CONT", SIGCONT, /* Continue (POSIX). */
"STOP", SIGSTOP, /* Stop, unblockable (POSIX). */
diff --git icedtea/hotspot/src/os/linux/vm/os_linux.cpp icedtea/hotspot/src/os/linux/vm/os_linux.cpp
index 89ba0ff..e84837a 100644
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
@@ -94,7 +94,6 @@
# include <string.h>
# include <syscall.h>
# include <sys/sysinfo.h>
-# include <gnu/libc-version.h>
# include <sys/ipc.h>
# include <sys/shm.h>
# include <link.h>
@@ -530,6 +529,13 @@ void os::Linux::hotspot_sigmask(Thread* thread) {
// detecting pthread library
void os::Linux::libpthread_init() {
+#if 1
+ // Hard code Alpine Linux supported musl compatible settings
+ os::Linux::set_glibc_version("glibc 2.9");
+ os::Linux::set_libpthread_version("NPTL");
+ os::Linux::set_is_NPTL();
+ os::Linux::set_is_floating_stack();
+#else
// Save glibc and pthread version strings. Note that _CS_GNU_LIBC_VERSION
// and _CS_GNU_LIBPTHREAD_VERSION are supported in glibc >= 2.3.2. Use a
// generic name for earlier versions.
@@ -588,6 +594,7 @@ void os::Linux::libpthread_init() {
if (os::Linux::is_NPTL() || os::Linux::supports_variable_stack_size()) {
os::Linux::set_is_floating_stack();
}
+#endif
}
/////////////////////////////////////////////////////////////////////////////
@@ -2830,6 +2837,11 @@ extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
extern "C" JNIEXPORT void numa_error(char *where) { }
extern "C" JNIEXPORT int fork1() { return fork(); }
+static void *dlvsym(void *handle, const char *name, const char *ver)
+{
+ return dlsym(handle, name);
+}
+
// Handle request to load libnuma symbol version 1.1 (API v1). If it fails
// load symbol from base version instead.
void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
diff --git openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
index 10d56d8..b9b2b77 100644
--- openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.inline.hpp
@@ -33,7 +33,7 @@
#include <unistd.h>
#include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <netdb.h>
inline void* os::thread_local_storage_at(int index) {
diff --git openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
index d2c10e0..20f657f 100644
--- openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
+++ openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
@@ -75,7 +75,7 @@
# include <pwd.h>
# include <poll.h>
# include <ucontext.h>
-# include <fpu_control.h>
+# include <linux/types.h> /* provides __u64 */
#ifdef BUILTIN_SIM
#define REG_SP REG_RSP
diff --git openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
index 38388cb..2505ba8 100644
--- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
@@ -72,7 +72,6 @@
# include <pwd.h>
# include <poll.h>
# include <ucontext.h>
-# include <fpu_control.h>
#ifdef AMD64
#define REG_SP REG_RSP
@@ -543,6 +542,9 @@ JVM_handle_linux_signal(int sig,
ShouldNotReachHere();
}
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
+
void os::Linux::init_thread_fpu_state(void) {
#ifndef AMD64
// set fpu to 53 bit precision
diff --git openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
index f3f2f26..6b50cfa 100644
--- openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
@@ -32,7 +32,9 @@
// map stack pointer to thread pointer - see notes in threadLS_linux_x86.cpp
#define SP_BITLENGTH 32
#define PAGE_SHIFT 12
+ #ifndef PAGE_SIZE
#define PAGE_SIZE (1UL << PAGE_SHIFT)
+ #endif
static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
public:
diff --git openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
index efa0b4e..6df2302 100644
--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
@@ -235,7 +235,7 @@ inline int g_isnan(double f) { return isnand(f); }
#elif defined(__APPLE__)
inline int g_isnan(double f) { return isnan(f); }
#elif defined(LINUX) || defined(_ALLBSD_SOURCE)
-inline int g_isnan(float f) { return isnanf(f); }
+inline int g_isnan(float f) { return isnan(f); }
inline int g_isnan(double f) { return isnan(f); }
#else
#error "missing platform-specific definition here"