Mercurial > hg > icedtea8
changeset 2880:56a0cebda85c icedtea-3.11.0pre02
Bump aarch32 to jdk8u192-b12-aarch32-181022.
Upstream changes:
- S6730115: Fastdebug VM crashes with "ExceptionMark destructor expects no pending exceptions" error
- S8008321: compile.cpp verify_graph_edges uses bool as int
- S8026331: hs_err improvement: Print if we have seen any OutOfMemoryErrors or StackOverflowErrors
- S8026335: hs_err improvement: Print exact compressed oops mode and the heap base value.
- S8035074: hs_err improvement: Add time zone information in the hs_err file
- S8038636: speculative traps break when classes are redefined
- S8041623: Solaris Studio 12.4 C++ 5.13, CHECK_UNHANDLED_OOPS use of class oop's copy constructor definitions causing error level diagnostic.
- S8048128: Fix for Solaris Studio C++ 5.13, CHECK_UNHANDLED_OOPS breaks PPC build.
- S8055008: Clean up code that saves the previous versions of redefined classes
- S8057570: RedefineClasses() tests fail assert(((Metadata*)obj)->is_valid()) failed: obj is valid
- S8069124: runtime/NMT/MallocSiteHashOverflow.java failing in nightlies
- S8077420: Build failure with SS12u4
- S8078628: linux-zero does not build without precompiled header
- S8081202: Hotspot compile warning: "Invalid suffix on literal; C++11 requires a space between literal and identifier"
- S8081323: ConstantPool::_resolved_references is missing in heap dump
- S8114823: G1 doesn't honor request to disable class unloading
- S8134157: adlc fails to compile with SS12u4
- S8138692: libjsig compilation is missing EXTRA_CFLAGS on macosx
- S8146115: Improve docker container detection and resource configuration usage
- S8148175: C1: G1 barriers don't preserve FP registers
- S8150426: Wrong cast in metadata_at_put
- S8150688: Fix os_windows siglabel
- S8153194: PreserveFPRegistersTest.java runs out of memory in the nightlies
- S8156137: SIGSEGV in ReceiverTypeData::clean_weak_klass_links
- S8158012: Use SW prefetch instructions instead of BIS for allocation prefetches on SPARC Core C4
- S8160748: Inconsistent types for ideal_reg
- S8162540: Crash in C2 escape analysis with assert: "node should be registered"
- S8164480: Crash with assert(handler_address == SharedRuntime::compute_compiled_exc_handler(..) failed: Must be the same
- S8165489: Missing G1 barrier in Unsafe_GetObjectVolatile
- S8169201: Montgomery multiply intrinsic should use correct name
- S8173013: JVMTI tagged object access needs G1 pre-barrier
- S8185723: Zero: segfaults on Power PC 32-bit
- S8186461: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
- S8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack
- S8187577: JVM crash during gc doing concurrent marking
- S8188223: IfNode::range_check_trap_proj() should handler dying subgraph with single if proj
- S8189170: Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
- S8189851: [TESTBUG] runtime/RedefineTests/RedefineInterfaceCall.java fails
- S8194642: Improve OOM error reporting for JDK8
- S8194739: Zero port of 8174962: Better interface invocations
- S8196880: VS2017 Addition of Global Delete Operator with Size Parameter Conflicts with Arena's Chunk Provided One
- S8196884: VS2017 Multiple Type Cast Conversion Compilation Errors
- S8197864: VS2017 (C4334) Result of 32-bit Shift Implicitly Converted to 64 bits
- S8197868: VS2017 (C2065) 'timezone': Undeclared Identifier in share/runtime/os.cpp
- S8198304: VS2017 (C4838, C4312) Various conversion issues with gtest tests
- S8198794: Hotspot crash on Cassandra 3.11.1 startup with libnuma 2.0.3
- S8199406: Performance drop with Java JDK 1.8.0_162-b32
- S8201509: Zero: S390 31bit atomic_copy64 inline assembler is wrong
- S8202600: [Zero] Undefined behaviour in src/os_cpu/linux_zero/vm/os_linux_zero.cpp
- S8203349: 8u hotspot should recognise later Windows compilers
- S8204053: libsaproc.so not linked with -z,noexecstack
- S8204872: [8u] VS2017: more instances of "error C3680: cannot concatenate user-defined string literals with mismatched literal suffix identifiers"
- S8205104: EXTRA_LDFLAGS not consistently being used
- S8205440: [8u] DWORD64 required for later Windows compilers
- S8205677: [8u] casts and type change for 8u to enable later Windows compilers
- S8206406: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list
- S8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped
- S8206454: [8u] os::current_stack_pointer() fails to compile on later Windows compilers (warning C4172: returning address of local variable)
- S8207402: Stray *.debuginfo files when not stripping debug info
ChangeLog:
2019-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org>
Bump aarch32 to jdk8u192-b12-aarch32-181022.
* patches/hotspot/aarch32/8008321-pr3599.patch,
* patches/hotspot/aarch32/8165489-pr3589.patch,
* patches/hotspot/aarch32/8185723-pr3553.patch,
* patches/hotspot/aarch32/8186461-pr3557.patch,
* patches/hotspot/aarch32/8201509-pr3579.patch,
* patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch,
* patches/hotspot/aarch32/pr3539-rh1548475.patch:
Remove patches now upstream.
* Makefile.am:
(ICEDTEA_PATCHES): Remove AArch32-only patches which
are now included in the updated tarball.
* NEWS: Updated.
* hotspot.map.in: Bump aarch32 to
jdk8u192-b12-aarch32-181022.
* patches/hotspot/aarch32/8141491-pr3159-g592292.patch,
* patches/hotspot/aarch32/8143245-pr3548.patch,
* patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch,
* patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch,
* patches/hotspot/aarch32/pr1368.patch,
* patches/hotspot/aarch32/pr3593.patch,
* patches/hotspot/aarch32/pr3607.patch,
* patches/hotspot/aarch32/werror.patch:
Replace pre-8u192 versions with symlinks to Shenandoah
versions.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Mon, 04 Feb 2019 05:38:49 +0000 |
parents | 4a65c52b2bc8 |
children | fbc0e6cbc34f |
files | ChangeLog Makefile.am NEWS hotspot.map.in patches/hotspot/aarch32/8008321-pr3599.patch patches/hotspot/aarch32/8141491-pr3159-g592292.patch patches/hotspot/aarch32/8143245-pr3548.patch patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch patches/hotspot/aarch32/8165489-pr3589.patch patches/hotspot/aarch32/8185723-pr3553.patch patches/hotspot/aarch32/8186461-pr3557.patch patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch patches/hotspot/aarch32/8201509-pr3579.patch patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch patches/hotspot/aarch32/pr1368.patch patches/hotspot/aarch32/pr3539-rh1548475.patch patches/hotspot/aarch32/pr3593.patch patches/hotspot/aarch32/pr3607.patch patches/hotspot/aarch32/werror.patch |
diffstat | 19 files changed, 39 insertions(+), 2582 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Feb 04 03:04:04 2019 +0000 +++ b/ChangeLog Mon Feb 04 05:38:49 2019 +0000 @@ -1,3 +1,31 @@ +2019-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org> + + Bump aarch32 to jdk8u192-b12-aarch32-181022. + * patches/hotspot/aarch32/8008321-pr3599.patch, + * patches/hotspot/aarch32/8165489-pr3589.patch, + * patches/hotspot/aarch32/8185723-pr3553.patch, + * patches/hotspot/aarch32/8186461-pr3557.patch, + * patches/hotspot/aarch32/8201509-pr3579.patch, + * patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch, + * patches/hotspot/aarch32/pr3539-rh1548475.patch: + Remove patches now upstream. + * Makefile.am: + (ICEDTEA_PATCHES): Remove AArch32-only patches which + are now included in the updated tarball. + * NEWS: Updated. + * hotspot.map.in: Bump aarch32 to + jdk8u192-b12-aarch32-181022. + * patches/hotspot/aarch32/8141491-pr3159-g592292.patch, + * patches/hotspot/aarch32/8143245-pr3548.patch, + * patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch, + * patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch, + * patches/hotspot/aarch32/pr1368.patch, + * patches/hotspot/aarch32/pr3593.patch, + * patches/hotspot/aarch32/pr3607.patch, + * patches/hotspot/aarch32/werror.patch: + Replace pre-8u192 versions with symlinks to Shenandoah + versions. + 2019-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org> PR3691: wget not detected by configure
--- a/Makefile.am Mon Feb 04 03:04:04 2019 +0000 +++ b/Makefile.am Mon Feb 04 05:38:49 2019 +0000 @@ -350,14 +350,7 @@ if WITH_AARCH32_HSBUILD ICEDTEA_PATCHES += \ patches/hotspot/$(HSBUILD)/pr3548-aarch32.patch \ - patches/hotspot/$(HSBUILD)/8008321-pr3599.patch \ - patches/hotspot/$(HSBUILD)/8078628-pr3208.patch \ - patches/hotspot/$(HSBUILD)/8165489-pr3589.patch \ - patches/hotspot/$(HSBUILD)/8185723-pr3553.patch \ - patches/hotspot/$(HSBUILD)/8186461-pr3557.patch \ - patches/hotspot/$(HSBUILD)/8201509-pr3579.patch \ - patches/hotspot/$(HSBUILD)/8206406-pr3610-rh1597825.patch \ - patches/hotspot/$(HSBUILD)/pr3539-rh1548475.patch + patches/hotspot/$(HSBUILD)/8078628-pr3208.patch endif ICEDTEA_PATCHES += \
--- a/NEWS Mon Feb 04 03:04:04 2019 +0000 +++ b/NEWS Mon Feb 04 05:38:49 2019 +0000 @@ -58,6 +58,7 @@ - S8162362: Introduce system property to control enabled ciphersuites - S8162540: Crash in C2 escape analysis with assert: "node should be registered" - S8165463: Native implementation of sunmscapi should use operator new (nothrow) for allocations + - S8173013: JVMTI tagged object access needs G1 pre-barrier - S8176033: New cygwin grep does not match \r as newline - S8176192: Incorrect usage of Iterator in Java 8 In com.sun.jndi.ldap.EventSupport.removeNamingListener - S8178370: [TEST_BUG] java/security/Signature/SignatureLength.java fails
--- a/hotspot.map.in Mon Feb 04 03:04:04 2019 +0000 +++ b/hotspot.map.in Mon Feb 04 05:38:49 2019 +0000 @@ -1,4 +1,4 @@ # version type(drop/hg) url changeset sha256sum default drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ b99dbcd228f6 a60a5d717be518db643d1637e3d2946a41df9166824e720dfc0fbd3e91a46cf9 shenandoah drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 106435e9e204 bb55e33d53cb5438fa9e16a1ef5f82ebb793a1248f75c0518e861b8dd60bbaba -aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ f38b47a322eb b2a76be156bf7af00dd705abe80ea819afa7b42ad2dbc37dac4df05f87d3803c +aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 8b4e37a274de ce43ce10106cfc06f6b234d917d53765ed7a94168818a468ccf45bedc3683de0
--- a/patches/hotspot/aarch32/8008321-pr3599.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# HG changeset patch -# User thartmann -# Date 1403244870 -7200 -# Fri Jun 20 08:14:30 2014 +0200 -# Node ID 533473c67de6ff767710594639033c8e83523fe5 -# Parent 8cde8f606e3f4f7c8809d9c1ebc71e45615f7402 -8008321, PR3599: compile.cpp verify_graph_edges uses bool as int -Summary: The dead_nodes counter in verify_graph_edges(..) has the type bool but is used as int. -Reviewed-by: roland, anoll - -diff --git openjdk.orig/hotspot/src/share/vm/opto/compile.cpp openjdk/hotspot/src/share/vm/opto/compile.cpp ---- openjdk.orig/hotspot/src/share/vm/opto/compile.cpp -+++ openjdk/hotspot/src/share/vm/opto/compile.cpp -@@ -3516,7 +3516,7 @@ - _root->verify_edges(visited); - if (no_dead_code) { - // Now make sure that no visited node is used by an unvisited node. -- bool dead_nodes = 0; -+ bool dead_nodes = false; - Unique_Node_List checked(area); - while (visited.size() > 0) { - Node* n = visited.pop(); -@@ -3527,14 +3527,16 @@ - if (visited.member(use)) continue; // already in the graph - if (use->is_Con()) continue; // a dead ConNode is OK - // At this point, we have found a dead node which is DU-reachable. -- if (dead_nodes++ == 0) -+ if (!dead_nodes) { - tty->print_cr("*** Dead nodes reachable via DU edges:"); -+ dead_nodes = true; -+ } - use->dump(2); - tty->print_cr("---"); - checked.push(use); // No repeats; pretend it is now checked. - } - } -- assert(dead_nodes == 0, "using nodes must be reachable from root"); -+ assert(!dead_nodes, "using nodes must be reachable from root"); - } - } - }
--- a/patches/hotspot/aarch32/8141491-pr3159-g592292.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/8141491-pr3159-g592292.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,311 +1,1 @@ -# HG changeset patch -# User mikael -# Date 1477450078 -3600 -# Wed Oct 26 03:47:58 2016 +0100 -# Node ID bca09127475293c1938b5413fbf25af2c281c597 -# Parent 3e73be729f73e0466652abea2fa205cf196e9941 -8141491, PR3159, G592292: Unaligned memory access in Bits.c -Summary: Introduce alignment-safe Copy::conjoint_swap and j.i.m.Unsafe.copySwapMemory -Reviewed-by: jrose, dholmes, psandoz - -diff --git a/src/share/vm/prims/unsafe.cpp b/src/share/vm/prims/unsafe.cpp ---- openjdk/hotspot/src/share/vm/prims/unsafe.cpp -+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp -@@ -740,6 +740,36 @@ - Copy::conjoint_memory_atomic(src, dst, sz); - UNSAFE_END - -+// This function is a leaf since if the source and destination are both in native memory -+// the copy may potentially be very large, and we don't want to disable GC if we can avoid it. -+// If either source or destination (or both) are on the heap, the function will enter VM using -+// JVM_ENTRY_FROM_LEAF -+JVM_LEAF(void, Unsafe_CopySwapMemory0(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size, jlong elemSize)) { -+ UnsafeWrapper("Unsafe_CopySwapMemory0"); -+ -+ size_t sz = (size_t)size; -+ size_t esz = (size_t)elemSize; -+ -+ if (srcObj == NULL && dstObj == NULL) { -+ // Both src & dst are in native memory -+ address src = (address)srcOffset; -+ address dst = (address)dstOffset; -+ -+ Copy::conjoint_swap(src, dst, sz, esz); -+ } else { -+ // At least one of src/dst are on heap, transition to VM to access raw pointers -+ -+ JVM_ENTRY_FROM_LEAF(env, void, Unsafe_CopySwapMemory0) { -+ oop srcp = JNIHandles::resolve(srcObj); -+ oop dstp = JNIHandles::resolve(dstObj); -+ -+ address src = (address)index_oop_from_field_offset_long(srcp, srcOffset); -+ address dst = (address)index_oop_from_field_offset_long(dstp, dstOffset); -+ -+ Copy::conjoint_swap(src, dst, sz, esz); -+ } JVM_END -+ } -+} JVM_END - - ////// Random queries - -@@ -1702,6 +1732,7 @@ - - JNINativeMethod memcopy_methods_17[] = { - {CC"copyMemory", CC"("OBJ"J"OBJ"JJ)V", FN_PTR(Unsafe_CopyMemory2)}, -+ {CC"copySwapMemory0", CC "(" OBJ "J" OBJ "JJJ)V", FN_PTR(Unsafe_CopySwapMemory0)}, - {CC"setMemory", CC"("OBJ"JJB)V", FN_PTR(Unsafe_SetMemory2)} - }; - -diff --git a/src/share/vm/runtime/interfaceSupport.hpp b/src/share/vm/runtime/interfaceSupport.hpp ---- openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp -+++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -431,6 +431,14 @@ - os::verify_stack_alignment(); \ - /* begin of body */ - -+#define VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) \ -+ TRACE_CALL(result_type, header) \ -+ debug_only(ResetNoHandleMark __rnhm;) \ -+ HandleMarkCleaner __hm(thread); \ -+ Thread* THREAD = thread; \ -+ os::verify_stack_alignment(); \ -+ /* begin of body */ -+ - - // ENTRY routines may lock, GC and throw exceptions - -@@ -592,6 +600,14 @@ - VM_LEAF_BASE(result_type, header) - - -+#define JVM_ENTRY_FROM_LEAF(env, result_type, header) \ -+ { { \ -+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \ -+ ThreadInVMfromNative __tiv(thread); \ -+ debug_only(VMNativeEntryWrapper __vew;) \ -+ VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread) -+ -+ - #define JVM_END } } - - #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP -diff --git a/src/share/vm/utilities/copy.cpp b/src/share/vm/utilities/copy.cpp ---- openjdk/hotspot/src/share/vm/utilities/copy.cpp -+++ openjdk/hotspot/src/share/vm/utilities/copy.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -53,6 +53,175 @@ - } - } - -+class CopySwap : AllStatic { -+public: -+ /** -+ * Copy and byte swap elements -+ * -+ * @param src address of source -+ * @param dst address of destination -+ * @param byte_count number of bytes to copy -+ * @param elem_size size of the elements to copy-swap -+ */ -+ static void conjoint_swap(address src, address dst, size_t byte_count, size_t elem_size) { -+ assert(src != NULL, err_msg("address must not be NULL")); -+ assert(dst != NULL, err_msg("address must not be NULL")); -+ assert(elem_size == 2 || elem_size == 4 || elem_size == 8, -+ err_msg("incorrect element size: " SIZE_FORMAT, elem_size)); -+ assert(is_size_aligned(byte_count, elem_size), -+ err_msg("byte_count " SIZE_FORMAT " must be multiple of element size " SIZE_FORMAT, byte_count, elem_size)); -+ -+ address src_end = src + byte_count; -+ -+ if (dst <= src || dst >= src_end) { -+ do_conjoint_swap<RIGHT>(src, dst, byte_count, elem_size); -+ } else { -+ do_conjoint_swap<LEFT>(src, dst, byte_count, elem_size); -+ } -+ } -+ -+private: -+ /** -+ * Byte swap a 16-bit value -+ */ -+ static uint16_t byte_swap(uint16_t x) { -+ return (x << 8) | (x >> 8); -+ } -+ -+ /** -+ * Byte swap a 32-bit value -+ */ -+ static uint32_t byte_swap(uint32_t x) { -+ uint16_t lo = (uint16_t)x; -+ uint16_t hi = (uint16_t)(x >> 16); -+ -+ return ((uint32_t)byte_swap(lo) << 16) | (uint32_t)byte_swap(hi); -+ } -+ -+ /** -+ * Byte swap a 64-bit value -+ */ -+ static uint64_t byte_swap(uint64_t x) { -+ uint32_t lo = (uint32_t)x; -+ uint32_t hi = (uint32_t)(x >> 32); -+ -+ return ((uint64_t)byte_swap(lo) << 32) | (uint64_t)byte_swap(hi); -+ } -+ -+ enum CopyDirection { -+ RIGHT, // lower -> higher address -+ LEFT // higher -> lower address -+ }; -+ -+ /** -+ * Copy and byte swap elements -+ * -+ * <T> - type of element to copy -+ * <D> - copy direction -+ * <is_src_aligned> - true if src argument is aligned to element size -+ * <is_dst_aligned> - true if dst argument is aligned to element size -+ * -+ * @param src address of source -+ * @param dst address of destination -+ * @param byte_count number of bytes to copy -+ */ -+ template <typename T, CopyDirection D, bool is_src_aligned, bool is_dst_aligned> -+ static void do_conjoint_swap(address src, address dst, size_t byte_count) { -+ address cur_src, cur_dst; -+ -+ switch (D) { -+ case RIGHT: -+ cur_src = src; -+ cur_dst = dst; -+ break; -+ case LEFT: -+ cur_src = src + byte_count - sizeof(T); -+ cur_dst = dst + byte_count - sizeof(T); -+ break; -+ } -+ -+ for (size_t i = 0; i < byte_count / sizeof(T); i++) { -+ T tmp; -+ -+ if (is_src_aligned) { -+ tmp = *(T*)cur_src; -+ } else { -+ memcpy(&tmp, cur_src, sizeof(T)); -+ } -+ -+ tmp = byte_swap(tmp); -+ -+ if (is_dst_aligned) { -+ *(T*)cur_dst = tmp; -+ } else { -+ memcpy(cur_dst, &tmp, sizeof(T)); -+ } -+ -+ switch (D) { -+ case RIGHT: -+ cur_src += sizeof(T); -+ cur_dst += sizeof(T); -+ break; -+ case LEFT: -+ cur_src -= sizeof(T); -+ cur_dst -= sizeof(T); -+ break; -+ } -+ } -+ } -+ -+ /** -+ * Copy and byte swap elements -+ * -+ * <T> - type of element to copy -+ * <D> - copy direction -+ * -+ * @param src address of source -+ * @param dst address of destination -+ * @param byte_count number of bytes to copy -+ */ -+ template <typename T, CopyDirection direction> -+ static void do_conjoint_swap(address src, address dst, size_t byte_count) { -+ if (is_ptr_aligned(src, sizeof(T))) { -+ if (is_ptr_aligned(dst, sizeof(T))) { -+ do_conjoint_swap<T,direction,true,true>(src, dst, byte_count); -+ } else { -+ do_conjoint_swap<T,direction,true,false>(src, dst, byte_count); -+ } -+ } else { -+ if (is_ptr_aligned(dst, sizeof(T))) { -+ do_conjoint_swap<T,direction,false,true>(src, dst, byte_count); -+ } else { -+ do_conjoint_swap<T,direction,false,false>(src, dst, byte_count); -+ } -+ } -+ } -+ -+ -+ /** -+ * Copy and byte swap elements -+ * -+ * <D> - copy direction -+ * -+ * @param src address of source -+ * @param dst address of destination -+ * @param byte_count number of bytes to copy -+ * @param elem_size size of the elements to copy-swap -+ */ -+ template <CopyDirection D> -+ static void do_conjoint_swap(address src, address dst, size_t byte_count, size_t elem_size) { -+ switch (elem_size) { -+ case 2: do_conjoint_swap<uint16_t,D>(src, dst, byte_count); break; -+ case 4: do_conjoint_swap<uint32_t,D>(src, dst, byte_count); break; -+ case 8: do_conjoint_swap<uint64_t,D>(src, dst, byte_count); break; -+ default: guarantee(false, err_msg("do_conjoint_swap: Invalid elem_size %zd\n", elem_size)); -+ } -+ } -+}; -+ -+void Copy::conjoint_swap(address src, address dst, size_t byte_count, size_t elem_size) { -+ CopySwap::conjoint_swap(src, dst, byte_count, elem_size); -+} - - // Fill bytes; larger units are filled atomically if everything is aligned. - void Copy::fill_to_memory_atomic(void* to, size_t size, jubyte value) { -diff --git a/src/share/vm/utilities/copy.hpp b/src/share/vm/utilities/copy.hpp ---- openjdk/hotspot/src/share/vm/utilities/copy.hpp -+++ openjdk/hotspot/src/share/vm/utilities/copy.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -227,6 +227,16 @@ - } - } - -+ /** -+ * Copy and *unconditionally* byte swap elements -+ * -+ * @param src address of source -+ * @param dst address of destination -+ * @param byte_count number of bytes to copy -+ * @param elem_size size of the elements to copy-swap -+ */ -+ static void conjoint_swap(address src, address dst, size_t byte_count, size_t elem_size); -+ - // Fill methods - - // Fill word-aligned words, not atomic on each word +../shenandoah/8141491-pr3159-g592292.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/8143245-pr3548.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/8143245-pr3548.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,154 +1,1 @@ -# HG changeset patch -# User sgehwolf -# Date 1525714161 -3600 -# Mon May 07 18:29:21 2018 +0100 -# Node ID afb31413c73cbc06420fdb447aa90a7a38258904 -# Parent bcbc64dfb629c5f188bbf59b8f986ad95963ed60 -8143245, PR3548: Zero build requires disabled warnings -Reviewed-by: dholmes, coleenp - -diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make ---- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make -+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. - # Copyright 2007, 2008 Red Hat, Inc. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # -@@ -29,11 +29,6 @@ - ifeq ($(USE_CLANG), true) - WARNING_FLAGS += -Wno-undef - endif --# Suppress some warning flags that are normally turned on for hotspot, --# because some of the zero code has not been updated accordingly. --WARNING_FLAGS += -Wno-return-type \ -- -Wno-format-nonliteral -Wno-format-security \ -- -Wno-maybe-uninitialized - - # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized - OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -diff --git openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp ---- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp -+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp -@@ -100,7 +100,7 @@ - case T_DOUBLE: - case T_VOID: - return result; -- default : ShouldNotReachHere(); -+ default : ShouldNotReachHere(); return NULL_WORD; - } - } - -diff --git openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp ---- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp -+++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2010 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * -@@ -62,7 +62,7 @@ - } - - void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) { -- ffi_type *ftype; -+ ffi_type *ftype = NULL; - switch (type) { - case T_VOID: - ftype = &ffi_type_void; -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp -@@ -1,6 +1,6 @@ - /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. -- * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. -+ * Copyright 2016 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -61,6 +61,7 @@ - - frame os::get_sender_for_C_frame(frame* fr) { - ShouldNotCallThis(); -+ return frame(NULL, NULL); // silence compile warning. - } - - frame os::current_frame() { -@@ -98,16 +99,19 @@ - - address os::Linux::ucontext_get_pc(ucontext_t* uc) { - ShouldNotCallThis(); -+ return NULL; // silence compile warnings - } - - ExtendedPC os::fetch_frame_from_context(void* ucVoid, - intptr_t** ret_sp, - intptr_t** ret_fp) { - ShouldNotCallThis(); -+ return NULL; // silence compile warnings - } - - frame os::fetch_frame_from_context(void* ucVoid) { - ShouldNotCallThis(); -+ return frame(NULL, NULL); // silence compile warnings - } - - extern "C" JNIEXPORT int -@@ -247,11 +251,16 @@ - } - #endif // !PRODUCT - -- const char *fmt = "caught unhandled signal %d"; - char buf[64]; - -- sprintf(buf, fmt, sig); -+ sprintf(buf, "caught unhandled signal %d", sig); -+ -+// Silence -Wformat-security warning for fatal() -+PRAGMA_DIAG_PUSH -+PRAGMA_FORMAT_NONLITERAL_IGNORED - fatal(buf); -+PRAGMA_DIAG_POP -+ return true; // silence compiler warnings - } - - void os::Linux::init_thread_fpu_state(void) { -@@ -260,6 +269,7 @@ - - int os::Linux::get_fpu_control_word() { - ShouldNotCallThis(); -+ return -1; // silence compile warnings - } - - void os::Linux::set_fpu_control_word(int fpu) { -@@ -408,6 +418,7 @@ - - extern "C" { - int SpinPause() { -+ return -1; // silence compile warnings - } - - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * -@@ -110,6 +110,7 @@ - void* ucontext, - bool isInJava) { - ShouldNotCallThis(); -+ return false; // silence compile warning - } - - // These routines are only used on cpu architectures that +../shenandoah/8143245-pr3548.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,467 +1,1 @@ -# HG changeset patch -# User simonis -# Date 1466155884 -7200 -# Fri Jun 17 11:31:24 2016 +0200 -# Node ID 4b40867e627dd9043bc67a4795caa9834ef69478 -# Parent 3fc29347b27fdd2075e6ec6d80bb26ab2bf667c1 -8158260, PR2991, RH1341258: PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions -Summary: Adjust instruction generation. Includes portions of 8026049 for test case. -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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2018-03-21 09:55:20.502296920 +0000 -@@ -1,6 +1,6 @@ - /* -- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. -- * Copyright 2012, 2014 SAP AG. All rights reserved. -+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. -+ * Copyright 2012, 2015 SAP AG. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -201,6 +201,11 @@ - FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); - } - -+ // This machine allows unaligned memory accesses -+ if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) { -+ FLAG_SET_DEFAULT(UseUnalignedAccesses, true); -+ } -+ - 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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp 2018-03-21 09:54:01.579562708 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -363,6 +363,13 @@ - (cache_line_size > ContendedPaddingWidth)) - ContendedPaddingWidth = cache_line_size; - -+ // This machine does not allow unaligned memory accesses -+ if (UseUnalignedAccesses) { -+ if (!FLAG_IS_DEFAULT(UseUnalignedAccesses)) -+ warning("Unaligned memory access is not available on this CPU"); -+ FLAG_SET_DEFAULT(UseUnalignedAccesses, false); -+ } -+ - #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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2018-03-21 09:54:01.579562708 +0000 -@@ -1033,6 +1033,11 @@ - (cache_line_size > ContendedPaddingWidth)) - ContendedPaddingWidth = cache_line_size; - -+ // This machine allows unaligned memory accesses -+ if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) { -+ FLAG_SET_DEFAULT(UseUnalignedAccesses, true); -+ } -+ - #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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2018-03-21 09:54:01.579562708 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright 2009 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * -@@ -36,4 +36,11 @@ - # include "os_bsd.inline.hpp" - #endif - --// This file is intentionally empty -+ -+void VM_Version::initialize() { -+ // This machine does not allow unaligned memory accesses -+ if (! FLAG_IS_DEFAULT(UseUnalignedAccesses)) { -+ warning("Unaligned memory access is not available on this CPU"); -+ 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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp 2018-03-21 09:54:01.579562708 +0000 -@@ -401,6 +401,24 @@ - - #endif // not SUPPORTS_NATIVE_CX8 - -+UNSAFE_ENTRY(jboolean, Unsafe_isBigEndian0(JNIEnv *env, jobject unsafe)) -+ UnsafeWrapper("Unsafe_IsBigEndian0"); -+ { -+#ifdef VM_LITTLE_ENDIAN -+ return false; -+#else -+ return true; -+#endif -+ } -+UNSAFE_END -+ -+UNSAFE_ENTRY(jint, Unsafe_unalignedAccess0(JNIEnv *env, jobject unsafe)) -+ UnsafeWrapper("Unsafe_UnalignedAccess0"); -+ { -+ return UseUnalignedAccesses; -+ } -+UNSAFE_END -+ - #define DEFINE_GETSETOOP(jboolean, Boolean) \ - \ - UNSAFE_ENTRY(jboolean, Unsafe_Get##Boolean##140(JNIEnv *env, jobject unsafe, jobject obj, jint offset)) \ -@@ -1727,6 +1745,9 @@ - {CC"loadFence", CC"()V", FN_PTR(Unsafe_LoadFence)}, - {CC"storeFence", CC"()V", FN_PTR(Unsafe_StoreFence)}, - {CC"fullFence", CC"()V", FN_PTR(Unsafe_FullFence)}, -+ -+ {CC"isBigEndian0", CC"()Z", FN_PTR(Unsafe_isBigEndian0)}, -+ {CC"unalignedAccess0", CC"()Z", FN_PTR(Unsafe_unalignedAccess0)} - }; - - #undef CC -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 2018-03-21 09:00:58.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2018-03-21 09:54:01.579562708 +0000 -@@ -3973,6 +3973,9 @@ - product(bool, UseLockedTracing, false, \ - "Use locked-tracing when doing event-based tracing") \ - \ -+ 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 2018-03-21 09:54:01.579562708 +0000 -@@ -0,0 +1,315 @@ -+/* -+ * Copyright (c) 2016 SAP SE. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ */ -+ -+/* -+ * @test -+ * @bug 8158260 -+ * @summary Test unaligned Unsafe accesses -+ * @modules java.base/jdk.internal.misc -+ * @run main/othervm -Diters=20000 -XX:-UseOnStackReplacement -XX:-BackgroundCompilation JdkInternalMiscUnsafeUnalignedAccess -+ * @author volker.simonis@gmail.com -+ */ -+ -+import java.lang.reflect.Field; -+import java.nio.ByteOrder; -+import sun.misc.Unsafe; -+ -+public class JdkInternalMiscUnsafeUnalignedAccess { -+ static final int ITERS = Integer.getInteger("iters", 20_000); -+ private static final boolean BIG_ENDIAN = ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN); -+ private static final Unsafe UNSAFE; -+ private static final int SIZE = 1024; -+ private static long memory; -+ -+ static { -+ try { -+ Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe"); -+ unsafeField.setAccessible(true); -+ UNSAFE = (Unsafe) unsafeField.get(null); -+ } -+ catch (Exception e) { -+ throw new RuntimeException("Unable to get Unsafe instance.", e); -+ } -+ } -+ -+ static int getInt_0() { -+ return UNSAFE.getInt(memory + 0); -+ } -+ static int getInt_1() { -+ return UNSAFE.getInt(memory + 1); -+ } -+ static int getInt_4() { -+ return UNSAFE.getInt(memory + 4); -+ } -+ static int getInt_17() { -+ return UNSAFE.getInt(memory + 17); -+ } -+ -+ static long getIntAsLong_0() { -+ return UNSAFE.getInt(memory + 0); -+ } -+ static long getIntAsLong_1() { -+ return UNSAFE.getInt(memory + 1); -+ } -+ static long getIntAsLong_4() { -+ return UNSAFE.getInt(memory + 4); -+ } -+ static long getIntAsLong_17() { -+ return UNSAFE.getInt(memory + 17); -+ } -+ -+ static long getLong_0() { -+ return UNSAFE.getLong(memory + 0); -+ } -+ static long getLong_1() { -+ return UNSAFE.getLong(memory + 1); -+ } -+ static long getLong_4() { -+ return UNSAFE.getLong(memory + 4); -+ } -+ static long getLong_8() { -+ return UNSAFE.getLong(memory + 8); -+ } -+ static long getLong_17() { -+ return UNSAFE.getLong(memory + 17); -+ } -+ -+ static void putInt_0(int i) { -+ UNSAFE.putInt(memory + 0, i); -+ } -+ static void putInt_1(int i) { -+ UNSAFE.putInt(memory + 1, i); -+ } -+ static void putInt_4(int i) { -+ UNSAFE.putInt(memory + 4, i); -+ } -+ static void putInt_17(int i) { -+ UNSAFE.putInt(memory + 17, i); -+ } -+ -+ static void putLong_0(long l) { -+ UNSAFE.putLong(memory + 0, l); -+ } -+ static void putLong_1(long l) { -+ UNSAFE.putLong(memory + 1, l); -+ } -+ static void putLong_4(long l) { -+ UNSAFE.putLong(memory + 4, l); -+ } -+ static void putLong_8(long l) { -+ UNSAFE.putLong(memory + 8, l); -+ } -+ static void putLong_17(long l) { -+ UNSAFE.putLong(memory + 17, l); -+ } -+ -+ public static void main(String[] args) throws Exception { -+ -+ if (!UNSAFE.unalignedAccess()) { -+ System.out.println("Platform is not supporting unaligned access - nothing to test."); -+ return; -+ } -+ -+ memory = UNSAFE.allocateMemory(SIZE); -+ -+ UNSAFE.putInt(memory + 0, 0x00112233); -+ UNSAFE.putInt(memory + 4, 0x44556677); -+ UNSAFE.putInt(memory + 8, 0x8899aabb); -+ UNSAFE.putInt(memory + 12, 0xccddeeff); -+ UNSAFE.putInt(memory + 16, 0x01234567); -+ UNSAFE.putInt(memory + 20, 0x89abcdef); -+ UNSAFE.putInt(memory + 24, 0x01234567); -+ -+ // Unsafe.getInt() -+ int res; -+ for (int i = 0; i < ITERS; i++) { -+ res = getInt_0(); -+ if (res != 0x00112233) { -+ throw new Exception(res + " != 0x00112233"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ res = getInt_1(); -+ if (res != (BIG_ENDIAN ? 0x11223344 : 0x77001122)) { -+ throw new Exception(res + " != " + (BIG_ENDIAN ? 0x11223344 : 0x77001122)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ res = getInt_4(); -+ if (res != 0x44556677) { -+ throw new Exception(res + " != 0x44556677"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ res = getInt_17(); -+ if (res != (BIG_ENDIAN ? 0x23456789 : 0xef012345)) { -+ throw new Exception(res + " != " + (BIG_ENDIAN ? 0x23456789 : 0xef012345)); -+ } -+ } -+ -+ // (long)Unsafe.getInt() -+ long lres; -+ for (int i = 0; i < ITERS; i++) { -+ lres = getIntAsLong_0(); -+ if (lres != (long)0x00112233) { -+ throw new Exception(lres + " != 0x00112233"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getIntAsLong_1(); -+ if (lres != (BIG_ENDIAN ? (long)0x11223344 : (long)0x77001122)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? (long)0x11223344 : (long)0x77001122)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getIntAsLong_4(); -+ if (lres != (long)0x44556677) { -+ throw new Exception(lres + " != 0x44556677"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getIntAsLong_17(); -+ if (lres != (BIG_ENDIAN ? (long)0x23456789 : (long)0xef012345)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? (long)0x23456789 : (long)0xef012345)); -+ } -+ } -+ -+ // Unsafe.getLong() -+ for (int i = 0; i < ITERS; i++) { -+ lres = getLong_0(); -+ if (lres != (BIG_ENDIAN ? 0x0011223344556677L : 0x4455667700112233L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x0011223344556677L : 0x4455667700112233L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getLong_1(); -+ if (lres != (BIG_ENDIAN ? 0x1122334455667788L : 0xbb44556677001122L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x1122334455667788L : 0xbb44556677001122L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getLong_4(); -+ if (lres != (BIG_ENDIAN ? 0x445566778899aabbL : 0x8899aabb44556677L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x445566778899aabbL : 0x8899aabb44556677L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getLong_8(); -+ if (lres != (BIG_ENDIAN ? 0x8899aabbccddeeffL : 0xccddeeff8899aabbL)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x8899aabbccddeeffL : 0xccddeeff8899aabbL)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ lres = getLong_17(); -+ if (lres != (BIG_ENDIAN ? 0x23456789abcdef01L : 0x6789abcdef012345L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x23456789abcdef01L : 0x6789abcdef012345L)); -+ } -+ } -+ -+ // Unsafe.putInt() -+ for (int i = 0; i < ITERS; i++) { -+ putInt_0(0x00112233); -+ res = getInt_0(); -+ if (res != 0x00112233) { -+ throw new Exception(res + " != 0x00112233"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putInt_1(BIG_ENDIAN ? 0x11223344 : 0x77001122); -+ res = getInt_1(); -+ if (res != (BIG_ENDIAN ? 0x11223344 : 0x77001122)) { -+ throw new Exception(res + " != " + (BIG_ENDIAN ? 0x11223344 : 0x77001122)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putInt_4(0x44556677); -+ res = getInt_4(); -+ if (res != 0x44556677) { -+ throw new Exception(res + " != 0x44556677"); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putInt_17(BIG_ENDIAN ? 0x23456789 : 0xef012345); -+ res = getInt_17(); -+ if (res != (BIG_ENDIAN ? 0x23456789 : 0xef012345)) { -+ throw new Exception(res + " != " + (BIG_ENDIAN ? 0x23456789 : 0xef012345)); -+ } -+ } -+ -+ -+ // Unsafe.putLong() -+ for (int i = 0; i < ITERS; i++) { -+ putLong_0(BIG_ENDIAN ? 0x0011223344556677L : 0x4455667700112233L); -+ lres = getLong_0(); -+ if (lres != (BIG_ENDIAN ? 0x0011223344556677L : 0x4455667700112233L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x0011223344556677L : 0x4455667700112233L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putLong_1(BIG_ENDIAN ? 0x1122334455667788L : 0xbb44556677001122L); -+ lres = getLong_1(); -+ if (lres != (BIG_ENDIAN ? 0x1122334455667788L : 0xbb44556677001122L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x1122334455667788L : 0xbb44556677001122L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putLong_4(BIG_ENDIAN ? 0x445566778899aabbL : 0x8899aabb44556677L); -+ lres = getLong_4(); -+ if (lres != (BIG_ENDIAN ? 0x445566778899aabbL : 0x8899aabb44556677L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x445566778899aabbL : 0x8899aabb44556677L)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putLong_8(BIG_ENDIAN ? 0x8899aabbccddeeffL : 0xccddeeff8899aabbL); -+ lres = getLong_8(); -+ if (lres != (BIG_ENDIAN ? 0x8899aabbccddeeffL : 0xccddeeff8899aabbL)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x8899aabbccddeeffL : 0xccddeeff8899aabbL)); -+ } -+ } -+ -+ for (int i = 0; i < ITERS; i++) { -+ putLong_17(BIG_ENDIAN ? 0x23456789abcdef01L : 0x6789abcdef012345L); -+ lres = getLong_17(); -+ if (lres != (BIG_ENDIAN ? 0x23456789abcdef01L : 0x6789abcdef012345L)) { -+ throw new Exception(lres + " != " + (BIG_ENDIAN ? 0x23456789abcdef01L : 0x6789abcdef012345L)); -+ } -+ } -+ } -+ -+} +../shenandoah/8158260-pr2991-rh1341258.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/8165489-pr3589.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -# HG changeset patch -# User mdoerr -# Date 1473159687 -7200 -# Tue Sep 06 13:01:27 2016 +0200 -# Node ID 7f6e1069a5719c8908b53774d3560ce851c7cd70 -# Parent b8fc1e640c4c7f38ca94131279cb67c4d3de6961 -8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile -Summary: Add missing barrier, sharing code with Unsafe_GetObject. -Reviewed-by: kbarrett, mgerdin, pliden, tschatzl - -diff --git 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 -+++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp -@@ -199,37 +199,40 @@ - - // Get/SetObject must be special-cased, since it works with handles. - -+// We could be accessing the referent field in a reference -+// object. If G1 is enabled then we need to register non-null -+// referent with the SATB barrier. -+ -+#if INCLUDE_ALL_GCS -+static bool is_java_lang_ref_Reference_access(oop o, jlong offset) { -+ if (offset == java_lang_ref_Reference::referent_offset && o != NULL) { -+ Klass* k = o->klass(); -+ if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -+ assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -+ return true; -+ } -+ } -+ return false; -+} -+#endif -+ -+static void ensure_satb_referent_alive(oop o, jlong offset, oop v) { -+#if INCLUDE_ALL_GCS -+ if (UseG1GC && v != NULL && is_java_lang_ref_Reference_access(o, offset)) { -+ G1SATBCardTableModRefBS::enqueue(v); -+ } -+#endif -+} -+ - // The xxx140 variants for backward compatibility do not allow a full-width offset. - UNSAFE_ENTRY(jobject, Unsafe_GetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset)) - UnsafeWrapper("Unsafe_GetObject"); - if (obj == NULL) THROW_0(vmSymbols::java_lang_NullPointerException()); - GET_OOP_FIELD(obj, offset, v) -- jobject ret = JNIHandles::make_local(env, v); --#if INCLUDE_ALL_GCS -- // We could be accessing the referent field in a reference -- // object. If G1 is enabled then we need to register a non-null -- // referent with the SATB barrier. -- if (UseG1GC) { -- bool needs_barrier = false; - -- if (ret != NULL) { -- if (offset == java_lang_ref_Reference::referent_offset) { -- oop o = JNIHandles::resolve_non_null(obj); -- Klass* k = o->klass(); -- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -- needs_barrier = true; -- } -- } -- } -+ ensure_satb_referent_alive(p, offset, v); - -- if (needs_barrier) { -- oop referent = JNIHandles::resolve(ret); -- G1SATBCardTableModRefBS::enqueue(referent); -- } -- } --#endif // INCLUDE_ALL_GCS -- return ret; -+ return JNIHandles::make_local(env, v); - UNSAFE_END - - UNSAFE_ENTRY(void, Unsafe_SetObject140(JNIEnv *env, jobject unsafe, jobject obj, jint offset, jobject x_h)) -@@ -262,32 +265,10 @@ - UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) - UnsafeWrapper("Unsafe_GetObject"); - GET_OOP_FIELD(obj, offset, v) -- jobject ret = JNIHandles::make_local(env, v); --#if INCLUDE_ALL_GCS -- // We could be accessing the referent field in a reference -- // object. If G1 is enabled then we need to register non-null -- // referent with the SATB barrier. -- if (UseG1GC) { -- bool needs_barrier = false; - -- if (ret != NULL) { -- if (offset == java_lang_ref_Reference::referent_offset && obj != NULL) { -- oop o = JNIHandles::resolve(obj); -- Klass* k = o->klass(); -- if (InstanceKlass::cast(k)->reference_type() != REF_NONE) { -- assert(InstanceKlass::cast(k)->is_subclass_of(SystemDictionary::Reference_klass()), "sanity"); -- needs_barrier = true; -- } -- } -- } -+ ensure_satb_referent_alive(p, offset, v); - -- if (needs_barrier) { -- oop referent = JNIHandles::resolve(ret); -- G1SATBCardTableModRefBS::enqueue(referent); -- } -- } --#endif // INCLUDE_ALL_GCS -- return ret; -+ return JNIHandles::make_local(env, v); - UNSAFE_END - - UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h)) -@@ -312,6 +293,9 @@ - } else { - (void)const_cast<oop&>(v = *(volatile oop*) addr); - } -+ -+ ensure_satb_referent_alive(p, offset, v); -+ - OrderAccess::acquire(); - return JNIHandles::make_local(env, v); - UNSAFE_END
--- a/patches/hotspot/aarch32/8185723-pr3553.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# HG changeset patch -# User aph -# Date 1501690960 -3600 -# Wed Aug 02 17:22:40 2017 +0100 -# Node ID 91ab2eac9856ec86c16c0bedd32e0b87974ead6f -# Parent 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7 -8185723, PR3553: Zero: segfaults on Power PC 32-bit -Reviewed-by: roland - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -38,10 +38,10 @@ - static void atomic_copy64(volatile void *src, volatile void *dst) { - #if defined(PPC32) - double tmp; -- asm volatile ("lfd %0, 0(%1)\n" -- "stfd %0, 0(%2)\n" -- : "=f"(tmp) -- : "b"(src), "b"(dst)); -+ asm volatile ("lfd %0, %2\n" -+ "stfd %0, %1\n" -+ : "=&f"(tmp), "=Q"(*(volatile double*)dst) -+ : "Q"(*(volatile double*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; - asm volatile ("ld %0, 0(%1)\n"
--- a/patches/hotspot/aarch32/8186461-pr3557.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# HG changeset patch -# User glaubitz -# Date 1524889690 -3600 -# Sat Apr 28 05:28:10 2018 +0100 -# Node ID be1379a186ba527b32c93a83e04c9600735fe44b -# Parent 91ab2eac9856ec86c16c0bedd32e0b87974ead6f -8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe -Reviewed-by: aph - -diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp -@@ -36,12 +36,18 @@ - - // Atomically copy 64 bits of data - static void atomic_copy64(volatile void *src, volatile void *dst) { --#if defined(PPC32) -+#if defined(PPC32) && !defined(__SPE__) - double tmp; - asm volatile ("lfd %0, %2\n" - "stfd %0, %1\n" - : "=&f"(tmp), "=Q"(*(volatile double*)dst) - : "Q"(*(volatile double*)src)); -+#elif defined(PPC32) && defined(__SPE__) -+ long tmp; -+ asm volatile ("evldd %0, %2\n" -+ "evstdd %0, %1\n" -+ : "=&r"(tmp), "=Q"(*(volatile long*)dst) -+ : "Q"(*(volatile long*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; - asm volatile ("ld %0, 0(%1)\n"
--- a/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,273 +1,1 @@ -# HG changeset patch -# User aph -# Date 1524109541 -3600 -# Thu Apr 19 04:45:41 2018 +0100 -# Node ID 4e2adbc3d2b512f6b2bf318d2db60f4d1903f8c7 -# Parent 20a18751757aaac9782d8272dcfe22998001066f -8197429, PR3546: Increased stack guard causes segfaults on x86-32 -Reviewed-by: dholmes - -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -674,6 +674,10 @@ - } - } - -+void os::Linux::expand_stack_to(address bottom) { -+ _expand_stack_to(bottom); -+} -+ - bool os::Linux::manually_expand_stack(JavaThread * t, address addr) { - assert(t!=NULL, "just checking"); - assert(t->osthread()->expanding_stack(), "expand should be set"); -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -245,6 +245,8 @@ - static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime); - - private: -+ static void expand_stack_to(address bottom); -+ - typedef int (*sched_getcpu_func_t)(void); - typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen); - typedef int (*numa_max_node_func_t)(void); -diff --git openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp ---- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp -+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -892,6 +892,25 @@ - void os::workaround_expand_exec_shield_cs_limit() { - #if defined(IA32) && !defined(ZERO) - size_t page_size = os::vm_page_size(); -+ -+ /* -+ * JDK-8197429 -+ * -+ * Expand the stack mapping to the end of the initial stack before -+ * attempting to install the codebuf. This is needed because newer -+ * Linux kernels impose a distance of a megabyte between stack -+ * memory and other memory regions. If we try to install the -+ * codebuf before expanding the stack the installation will appear -+ * to succeed but we'll get a segfault later if we expand the stack -+ * in Java code. -+ * -+ */ -+ if (os::Linux::is_initial_thread()) { -+ address limit = Linux::initial_thread_stack_bottom(); -+ limit += (StackYellowPages + StackRedPages) * page_size; -+ os::Linux::expand_stack_to(limit); -+ } -+ - /* - * Take the highest VA the OS will give us and exec - * -@@ -910,6 +929,16 @@ - char* hint = (char*) (Linux::initial_thread_stack_bottom() - - ((StackYellowPages + StackRedPages + 1) * page_size)); - char* codebuf = os::attempt_reserve_memory_at(page_size, hint); -+ -+ if (codebuf == NULL) { -+ // JDK-8197429: There may be a stack gap of one megabyte between -+ // the limit of the stack and the nearest memory region: this is a -+ // Linux kernel workaround for CVE-2017-1000364. If we failed to -+ // map our codebuf, try again at an address one megabyte lower. -+ hint -= 1 * M; -+ codebuf = os::attempt_reserve_memory_at(page_size, hint); -+ } -+ - if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { - return; // No matter, we tried, best effort. - } -diff --git openjdk.orig/hotspot/test/runtime/StackGap/T.java openjdk/hotspot/test/runtime/StackGap/T.java -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/runtime/StackGap/T.java -@@ -0,0 +1,33 @@ -+/* -+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ */ -+ -+public class T { -+ -+ public static void test(int n) { -+ if (n == 0) return; -+ System.out.println (n); -+ test (n - 1); -+ -+ } -+ -+} -diff --git openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c openjdk/hotspot/test/runtime/StackGap/exestack-gap.c -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/runtime/StackGap/exestack-gap.c -@@ -0,0 +1,82 @@ -+/* -+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ */ -+ -+#include <jni.h> -+#include <stdio.h> -+#include <stdlib.h> -+ -+JNIEnv* create_vm(JavaVM **jvm, char *extra_option) -+{ -+ JNIEnv* env; -+ JavaVMInitArgs args; -+ JavaVMOption options[4]; -+ args.version = JNI_VERSION_1_8; -+ args.nOptions = 3 + (extra_option != NULL); -+ options[0].optionString = "-Xss2048k"; -+ char classpath[4096]; -+ snprintf(classpath, sizeof classpath, -+ "-Djava.class.path=%s", getenv("CLASSPATH")); -+ options[1].optionString = classpath; -+ options[2].optionString = "-XX:+UnlockExperimentalVMOptions"; -+ if (extra_option) { -+ options[3].optionString = extra_option; -+ } -+ args.options = &options[0]; -+ args.ignoreUnrecognized = 0; -+ int rv; -+ rv = JNI_CreateJavaVM(jvm, (void**)&env, &args); -+ if (rv < 0) return NULL; -+ return env; -+} -+ -+void run(char *extra_arg) { -+ JavaVM *jvm; -+ jclass T_class; -+ jmethodID test_method; -+ JNIEnv *env = create_vm(&jvm, extra_arg); -+ if (env == NULL) -+ exit(1); -+ T_class = (*env)->FindClass(env, "T"); -+ if ((*env)->ExceptionCheck(env) == JNI_TRUE) { -+ (*env)->ExceptionDescribe(env); -+ exit(1); -+ } -+ test_method = (*env)->GetStaticMethodID(env, T_class, "test", "(I)V"); -+ if ((*env)->ExceptionCheck(env) == JNI_TRUE) { -+ (*env)->ExceptionDescribe(env); -+ exit(1); -+ } -+ (*env)->CallStaticVoidMethod(env, T_class, test_method, 1000); -+} -+ -+ -+int main(int argc, char **argv) -+{ -+ if (argc > 1) { -+ run(argv[1]); -+ } else { -+ run(NULL); -+ } -+ -+ return 0; -+} -diff --git openjdk.orig/hotspot/test/runtime/StackGap/testme.sh openjdk/hotspot/test/runtime/StackGap/testme.sh -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/runtime/StackGap/testme.sh -@@ -0,0 +1,48 @@ -+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+# or visit www.oracle.com if you need additional information or have any -+# questions. -+#!/bin/sh -+ -+# -+# @test testme.sh -+# @summary Linux kernel stack guard should not cause segfaults on x86-32 -+# @compile T.java -+# @run shell testme.sh -+# -+ -+if [ "${TESTSRC}" = "" ] -+then -+ TESTSRC=${PWD} -+ echo "TESTSRC not set. Using "${TESTSRC}" as default" -+fi -+echo "TESTSRC=${TESTSRC}" -+## Adding common setup Variables for running shell tests. -+. ${TESTSRC}/../../test_env.sh -+ -+if [ "${VM_OS}" != "linux" ] -+then -+ echo "Test only valid for Linux" -+ exit 0 -+fi -+ -+LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH -+export LD_LIBRARY_PATH -+ -+${TESTNATIVEPATH}/stack-gap || exit $? +../shenandoah/8197429-pr3546-rh1536622.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/8201509-pr3579.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -# HG changeset patch -# User mbalao -# Date 1525317412 -3600 -# Thu May 03 04:16:52 2018 +0100 -# Node ID de79964656fc652f2085dac4fe99bcc128b5a3b1 -# Parent ffd5260fe5adcb26f87a14f1aaaf3e1a075d712a -8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong -Summary: The inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data -Reviewed-by: shade - -diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ---- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2019-01-31 05:10:28.443819579 +0000 -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2019-01-31 05:20:29.778340641 +0000 -@@ -1,6 +1,6 @@ - /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -- * Copyright 2007, 2008, 2010 Red Hat, Inc. -+ * Copyright 2007, 2008, 2010, 2018, Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -50,10 +50,10 @@ - : "Q"(*(volatile long*)src)); - #elif defined(S390) && !defined(_LP64) - double tmp; -- asm volatile ("ld %0, 0(%1)\n" -- "std %0, 0(%2)\n" -- : "=r"(tmp) -- : "a"(src), "a"(dst)); -+ asm volatile ("ld %0, %2\n" -+ "std %0, %1\n" -+ : "=&f"(tmp), "=Q"(*(volatile double*)dst) -+ : "Q"(*(volatile double*)src)); - #else - *(jlong *) dst = *(jlong *) src; - #endif
--- a/patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -# HG changeset patch -# User aph -# Date 1531146945 -3600 -# Mon Jul 09 15:35:45 2018 +0100 -# Node ID 95b72537801cc9946c27ad27f07e3f0790a21b08 -# Parent f6341f4635dacb56678264d29a88cd052b74036b -8206406, PR3610, RH1597825: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list -Reviewed-by: dholmes - -diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp -@@ -34,12 +34,12 @@ - - // Implementation of StubCodeDesc - --StubCodeDesc* StubCodeDesc::_list = NULL; --int StubCodeDesc::_count = 0; -+StubCodeDesc* volatile StubCodeDesc::_list = NULL; -+int StubCodeDesc::_count = 0; - - - StubCodeDesc* StubCodeDesc::desc_for(address pc) { -- StubCodeDesc* p = _list; -+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - while (p != NULL && !p->contains(pc)) p = p->_next; - // p == NULL || p->contains(pc) - return p; -@@ -47,7 +47,7 @@ - - - StubCodeDesc* StubCodeDesc::desc_for_index(int index) { -- StubCodeDesc* p = _list; -+ StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - while (p != NULL && p->index() != index) p = p->_next; - return p; - } -diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp -+++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp -@@ -38,7 +38,7 @@ - - class StubCodeDesc: public CHeapObj<mtCode> { - protected: -- static StubCodeDesc* _list; // the list of all descriptors -+ static StubCodeDesc* volatile _list; // the list of all descriptors - static int _count; // length of list - - StubCodeDesc* _next; // the next element in the linked list -@@ -69,13 +69,13 @@ - - StubCodeDesc(const char* group, const char* name, address begin) { - assert(name != NULL, "no name specified"); -- _next = _list; -+ _next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list); - _group = group; - _name = name; - _index = ++_count; // (never zero) - _begin = begin; - _end = NULL; -- _list = this; -+ OrderAccess::release_store_ptr(&_list, this); - }; - - const char* group() const { return _group; }
--- a/patches/hotspot/aarch32/pr1368.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/pr1368.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,674 +1,1 @@ -# HG changeset patch -# User andrew -# Date 1452532602 0 -# Mon Jan 11 17:16:42 2016 +0000 -# Node ID be477dd4629d2155bde02047cc81ca4f8b657a49 -# Parent e04f994581e23e89757774cd2033413bc650a831 -PR1368: Ensure debug data is available for all libraries and binaries without redundant files - -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/defs.make openjdk/hotspot/make/aix/makefiles/defs.make ---- openjdk.orig/hotspot/make/aix/makefiles/defs.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/aix/makefiles/defs.make 2017-05-11 03:10:28.785363420 +0100 -@@ -186,12 +186,14 @@ - # client and server subdirectories have symbolic links to ../libjsig.so - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) - #ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+#ifneq ($(STRIP_POLICY),no_strip) - # ifeq ($(ZIP_DEBUGINFO_FILES),1) - # EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz - # else - # EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo - # endif - #endif -+#endif - EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal -@@ -200,24 +202,28 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) - # ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+# ifneq ($(STRIP_POLICY),no_strip) - # ifeq ($(ZIP_DEBUGINFO_FILES),1) - # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz - # else - # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo - # endif - # endif -+# endif - endif - - ifeq ($(JVM_VARIANT_CLIENT),true) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) - # ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+# ifneq ($(STRIP_POLICY),no_strip) - # ifeq ($(ZIP_DEBUGINFO_FILES),1) - # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz - # else - # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo - # endif - # endif -+# endif - endif - - # Serviceability Binaries -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/jsig.make openjdk/hotspot/make/aix/makefiles/jsig.make ---- openjdk.orig/hotspot/make/aix/makefiles/jsig.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/aix/makefiles/jsig.make 2017-05-11 03:10:28.785363420 +0100 -@@ -60,6 +60,7 @@ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl - - #ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+#ifneq ($(STRIP_POLICY),no_strip) - # $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) - # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ - # ifeq ($(STRIP_POLICY),all_strip) -@@ -75,6 +76,7 @@ - # $(RM) $(LIBJSIG_DEBUGINFO) - # endif - #endif -+#endif - - install_jsig: $(LIBJSIG) - @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/saproc.make openjdk/hotspot/make/aix/makefiles/saproc.make ---- openjdk.orig/hotspot/make/aix/makefiles/saproc.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/aix/makefiles/saproc.make 2017-05-11 03:10:28.785363420 +0100 -@@ -88,8 +88,10 @@ - -o $@ \ - -lthread_db - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -99,8 +101,10 @@ - endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) - $(RM) $(LIBSAPROC_DEBUGINFO) -+ endif - endif - endif - -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/vm.make openjdk/hotspot/make/aix/makefiles/vm.make ---- openjdk.orig/hotspot/make/aix/makefiles/vm.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/aix/makefiles/vm.make 2017-05-11 03:10:28.785363420 +0100 -@@ -330,6 +330,7 @@ - # } - - #ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+#ifneq ($(STRIP_POLICY),no_strip) - # $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) - # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ - # ifeq ($(STRIP_POLICY),all_strip) -@@ -345,6 +346,7 @@ - # $(RM) $(LIBJVM_DEBUGINFO) - # endif - #endif -+#endif - - DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) - DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/defs.make openjdk/hotspot/make/bsd/makefiles/defs.make ---- openjdk.orig/hotspot/make/bsd/makefiles/defs.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/defs.make 2017-05-11 03:10:28.785363420 +0100 -@@ -269,6 +269,7 @@ - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz - else -@@ -279,6 +280,7 @@ - endif - endif - endif -+endif - - EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client -@@ -289,6 +291,7 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz - else -@@ -299,6 +302,7 @@ - endif - endif - endif -+ endif - endif - - ifeq ($(JVM_VARIANT_CLIENT),true) -@@ -306,6 +310,7 @@ - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz - else -@@ -316,6 +321,7 @@ - endif - endif - endif -+ endif - endif - - ifeq ($(JVM_VARIANT_MINIMAL1),true) -@@ -329,6 +335,7 @@ - $(EXPORT_LIB_DIR)/sa-jdi.jar - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - else -@@ -346,6 +353,7 @@ - $(EXPORT_LIB_DIR)/sa-jdi.jar - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - else -@@ -356,6 +364,7 @@ - endif - endif - endif -+endif - - ADD_SA_BINARIES/ppc = - ADD_SA_BINARIES/ia64 = -@@ -398,6 +407,7 @@ - UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/Xusage.txt - UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/Xusage.txt - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.diz - UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.diz -@@ -410,6 +420,7 @@ - UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM - endif - endif -+ endif - - endif - endif -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/jsig.make openjdk/hotspot/make/bsd/makefiles/jsig.make ---- openjdk.orig/hotspot/make/bsd/makefiles/jsig.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/jsig.make 2017-05-11 03:10:28.785363420 +0100 -@@ -64,6 +64,7 @@ - $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(OS_VENDOR), Darwin) - $(DSYMUTIL) $@ - ifeq ($(ZIP_DEBUGINFO_FILES),1) -@@ -87,6 +88,7 @@ - endif - endif - endif -+endif - - install_jsig: $(LIBJSIG) - @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/saproc.make openjdk/hotspot/make/bsd/makefiles/saproc.make ---- openjdk.orig/hotspot/make/bsd/makefiles/saproc.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/saproc.make 2017-05-11 03:10:28.785363420 +0100 -@@ -137,6 +137,7 @@ - -o $@ \ - $(SALIBS) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(OS_VENDOR), Darwin) - $(DSYMUTIL) $@ - ifeq ($(ZIP_DEBUGINFO_FILES),1) -@@ -160,6 +161,7 @@ - endif - endif - endif -+endif - - install_saproc: $(BUILDLIBSAPROC) - @echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)" -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/vm.make openjdk/hotspot/make/bsd/makefiles/vm.make ---- openjdk.orig/hotspot/make/bsd/makefiles/vm.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/vm.make 2017-05-11 03:10:28.785363420 +0100 -@@ -342,6 +342,7 @@ - } - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(OS_VENDOR), Darwin) - $(DSYMUTIL) $@ - ifeq ($(ZIP_DEBUGINFO_FILES),1) -@@ -365,6 +366,7 @@ - endif - endif - endif -+endif - - DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) - DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ---- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/defs.make 2017-05-11 03:11:05.832767202 +0100 -@@ -247,12 +247,14 @@ - # client and server subdirectories have symbolic links to ../libjsig.so - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz - else - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo - endif - endif -+endif - EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal -@@ -261,24 +263,28 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz - else - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo - endif - endif -+ endif - endif - - ifeq ($(JVM_VARIANT_CLIENT),true) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz - else - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo - endif - endif -+ endif - endif - - ifeq ($(JVM_VARIANT_MINIMAL1),true) -@@ -286,12 +292,14 @@ - EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz - else - EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo - endif - endif -+ endif - endif - - # Serviceability Binaries -@@ -301,6 +309,7 @@ - ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ - $(EXPORT_LIB_DIR)/sa-jdi.jar - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz -@@ -309,6 +318,7 @@ - ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo - endif - endif -+endif - ADD_SA_BINARIES/ppc = - ADD_SA_BINARIES/ia64 = - ADD_SA_BINARIES/arm = -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make ---- openjdk.orig/hotspot/make/linux/makefiles/jsig.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/jsig.make 2017-05-11 03:10:28.785363420 +0100 -@@ -56,8 +56,10 @@ - $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -66,10 +68,12 @@ - # implied else here is no stripping at all - endif - endif -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) - $(RM) $(LIBJSIG_DEBUGINFO) - endif -+ endif - endif - - install_jsig: $(LIBJSIG) -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make ---- openjdk.orig/hotspot/make/linux/makefiles/saproc.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/saproc.make 2017-05-11 03:10:28.785363420 +0100 -@@ -98,8 +98,10 @@ - -o $@ \ - -lthread_db - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -109,8 +111,10 @@ - endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) - $(RM) $(LIBSAPROC_DEBUGINFO) -+ endif - endif - endif - -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2017-05-11 03:09:32.462269841 +0100 -+++ openjdk/hotspot/make/linux/makefiles/vm.make 2017-05-11 03:10:28.785363420 +0100 -@@ -365,8 +365,10 @@ - } - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -375,10 +377,12 @@ - # implied else here is no stripping at all - endif - endif -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) - $(RM) $(LIBJVM_DEBUGINFO) - endif -+ endif - endif - - DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) -diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/defs.make openjdk/hotspot/make/solaris/makefiles/defs.make ---- openjdk.orig/hotspot/make/solaris/makefiles/defs.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/defs.make 2017-05-11 03:10:28.785363420 +0100 -@@ -226,12 +226,14 @@ - # client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz - else - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo - endif - endif -+endif - - EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client -@@ -246,6 +248,7 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) - endif - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.diz -@@ -264,6 +267,7 @@ - endif - endif - endif -+ endif - endif - ifeq ($(JVM_VARIANT_CLIENT),true) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -@@ -275,6 +279,7 @@ - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) - endif - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.diz -@@ -293,10 +298,12 @@ - endif - endif - endif -+ endif - endif - - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz - else -diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/jsig.make openjdk/hotspot/make/solaris/makefiles/jsig.make ---- openjdk.orig/hotspot/make/solaris/makefiles/jsig.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/jsig.make 2017-05-11 03:10:28.785363420 +0100 -@@ -52,8 +52,10 @@ - $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ - $(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -62,10 +64,12 @@ - # implied else here is no stripping at all - endif - endif -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) - $(RM) $(LIBJSIG_DEBUGINFO) - endif -+ endif - endif - - install_jsig: $(LIBJSIG) -diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/saproc.make openjdk/hotspot/make/solaris/makefiles/saproc.make ---- openjdk.orig/hotspot/make/solaris/makefiles/saproc.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/saproc.make 2017-05-11 03:10:28.785363420 +0100 -@@ -121,8 +121,10 @@ - -c -o $(SADISOBJ) - - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -132,8 +134,10 @@ - endif - endif - ifeq ($(ZIP_DEBUGINFO_FILES),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) - $(RM) $(LIBSAPROC_DEBUGINFO) -+ endif - endif - endif - -diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/vm.make openjdk/hotspot/make/solaris/makefiles/vm.make ---- openjdk.orig/hotspot/make/solaris/makefiles/vm.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/vm.make 2017-05-11 03:10:28.785363420 +0100 -@@ -299,8 +299,10 @@ - $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) - $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO) - $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@ -+ endif - ifeq ($(STRIP_POLICY),all_strip) - $(QUIETLY) $(STRIP) $@ - else -@@ -309,10 +311,12 @@ - # implied else here is no stripping at all - endif - endif -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) - $(RM) $(LIBJVM_DEBUGINFO) - endif -+ endif - endif - endif # filter -sbfast -xsbfast - -diff -Nru openjdk.orig/hotspot/make/windows/makefiles/debug.make openjdk/hotspot/make/windows/makefiles/debug.make ---- openjdk.orig/hotspot/make/windows/makefiles/debug.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/windows/makefiles/debug.make 2017-05-11 03:10:28.785363420 +0100 -@@ -60,11 +60,13 @@ - $(MT) /manifest $@.manifest /outputresource:$@;#2 - !endif - !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" -+!if "$(STRIP_POLICY)" != "no_strip" - !if "$(ZIP_DEBUGINFO_FILES)" == "1" - $(ZIPEXE) -q $*.diz $*.map $*.pdb - $(RM) $*.map $*.pdb - !endif - !endif -+!endif - - !include $(WorkSpace)/make/windows/makefiles/shared.make - !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -Nru openjdk.orig/hotspot/make/windows/makefiles/defs.make openjdk/hotspot/make/windows/makefiles/defs.make ---- openjdk.orig/hotspot/make/windows/makefiles/defs.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/windows/makefiles/defs.make 2017-05-11 03:10:28.785363420 +0100 -@@ -253,6 +253,7 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.diz - else -@@ -260,11 +261,13 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map - endif - endif -+ endif - endif - ifeq ($(JVM_VARIANT_CLIENT),true) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.diz - else -@@ -272,6 +275,7 @@ - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map - endif - endif -+ endif - endif - - EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib -@@ -279,6 +283,7 @@ - ifeq ($(BUILD_WIN_SA), 1) - EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX) - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifneq ($(STRIP_POLICY),no_strip) - ifeq ($(ZIP_DEBUGINFO_FILES),1) - EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.diz - else -@@ -286,6 +291,7 @@ - EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map - endif - endif -+ endif - EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar - # Must pass this down to nmake. - MAKE_ARGS += BUILD_WIN_SA=1 -diff -Nru openjdk.orig/hotspot/make/windows/makefiles/fastdebug.make openjdk/hotspot/make/windows/makefiles/fastdebug.make ---- openjdk.orig/hotspot/make/windows/makefiles/fastdebug.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/windows/makefiles/fastdebug.make 2017-05-11 03:10:28.785363420 +0100 -@@ -59,11 +59,13 @@ - $(MT) /manifest $@.manifest /outputresource:$@;#2 - !endif - !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" -+!if "$(STRIP_POLICY)" != "no_strip" - !if "$(ZIP_DEBUGINFO_FILES)" == "1" - $(ZIPEXE) -q $*.diz $*.map $*.pdb - $(RM) $*.map $*.pdb - !endif - !endif -+!endif - - !include $(WorkSpace)/make/windows/makefiles/shared.make - !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -Nru openjdk.orig/hotspot/make/windows/makefiles/product.make openjdk/hotspot/make/windows/makefiles/product.make ---- openjdk.orig/hotspot/make/windows/makefiles/product.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/windows/makefiles/product.make 2017-05-11 03:10:28.785363420 +0100 -@@ -62,11 +62,13 @@ - $(MT) /manifest $@.manifest /outputresource:$@;#2 - !endif - !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" -+!if "$(STRIP_POLICY)" != "no_strip" - !if "$(ZIP_DEBUGINFO_FILES)" == "1" - $(ZIPEXE) -q $*.diz $*.map $*.pdb - $(RM) $*.map $*.pdb - !endif - !endif -+!endif - - !include $(WorkSpace)/make/windows/makefiles/shared.make - !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -Nru openjdk.orig/hotspot/make/windows/makefiles/sa.make openjdk/hotspot/make/windows/makefiles/sa.make ---- openjdk.orig/hotspot/make/windows/makefiles/sa.make 2017-04-20 13:33:45.000000000 +0100 -+++ openjdk/hotspot/make/windows/makefiles/sa.make 2017-05-11 03:10:28.785363420 +0100 -@@ -154,11 +154,13 @@ - $(MT) -manifest $(@F).manifest -outputresource:$(@F);#2 - !endif - !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" -+!if "$(STRIP_POLICY)" != "no_strip" - !if "$(ZIP_DEBUGINFO_FILES)" == "1" - $(ZIPEXE) -q $*.diz $*.map $*.pdb - $(RM) $*.map $*.pdb - !endif - !endif -+!endif - -@rm -f $*.obj - - cleanall : +../shenandoah/pr1368.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/pr3539-rh1548475.patch Mon Feb 04 03:04:04 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1526065930 -3600 -# Fri May 11 20:12:10 2018 +0100 -# Node ID b8fc1e640c4c7f38ca94131279cb67c4d3de6961 -# Parent afb31413c73cbc06420fdb447aa90a7a38258904 -PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build - -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/jsig.make openjdk/hotspot/make/aix/makefiles/jsig.make ---- openjdk.orig/hotspot/make/aix/makefiles/jsig.make 2018-09-10 16:45:58.782316574 +0100 -+++ openjdk/hotspot/make/aix/makefiles/jsig.make 2018-09-10 16:55:19.785492708 +0100 -@@ -45,7 +45,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) -+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - LFLAGS_JSIG += $(BIN_UTILS) - -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/saproc.make openjdk/hotspot/make/aix/makefiles/saproc.make ---- openjdk.orig/hotspot/make/aix/makefiles/saproc.make 2018-09-10 16:45:58.782316574 +0100 -+++ openjdk/hotspot/make/aix/makefiles/saproc.make 2018-09-10 16:55:19.785492708 +0100 -@@ -66,7 +66,7 @@ - endif - - --SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) - $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ -diff -Nru openjdk.orig/hotspot/make/aix/makefiles/vm.make openjdk/hotspot/make/aix/makefiles/vm.make ---- openjdk.orig/hotspot/make/aix/makefiles/vm.make 2018-09-10 16:45:58.782316574 +0100 -+++ openjdk/hotspot/make/aix/makefiles/vm.make 2018-09-10 16:55:19.785492708 +0100 -@@ -117,7 +117,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/jsig.make openjdk/hotspot/make/bsd/makefiles/jsig.make ---- openjdk.orig/hotspot/make/bsd/makefiles/jsig.make 2018-09-10 16:45:58.798316322 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/jsig.make 2018-09-10 16:55:19.785492708 +0100 -@@ -52,7 +52,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) -+LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - # DEBUG_BINARIES overrides everything, use full -g debug information - ifeq ($(DEBUG_BINARIES), true) -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/saproc.make openjdk/hotspot/make/bsd/makefiles/saproc.make ---- openjdk.orig/hotspot/make/bsd/makefiles/saproc.make 2018-09-10 16:45:58.798316322 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/saproc.make 2018-09-10 16:55:19.785492708 +0100 -@@ -114,7 +114,7 @@ - # bring in minimum version argument or we'll fail on OSX 10.10 - SA_LFLAGS = $(LFLAGS) - endif --SA_LFLAGS += $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS += $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ - -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") -diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/vm.make openjdk/hotspot/make/bsd/makefiles/vm.make ---- openjdk.orig/hotspot/make/bsd/makefiles/vm.make 2018-09-10 16:45:58.798316322 +0100 -+++ openjdk/hotspot/make/bsd/makefiles/vm.make 2018-09-10 16:55:19.785492708 +0100 -@@ -119,7 +119,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make ---- openjdk.orig/hotspot/make/linux/makefiles/jsig.make 2018-09-10 16:45:58.798316322 +0100 -+++ openjdk/hotspot/make/linux/makefiles/jsig.make 2018-09-10 16:55:45.461088863 +0100 -@@ -44,7 +44,7 @@ - # cause problems with interposing. See CR: 6466665 - # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) - --LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(LDFLAGS_NO_EXEC_STACK) -+LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE) $(LDFLAGS_NO_EXEC_STACK) $(EXTRA_LDFLAGS) - - # DEBUG_BINARIES overrides everything, use full -g debug information - ifeq ($(DEBUG_BINARIES), true) -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make ---- openjdk.orig/hotspot/make/linux/makefiles/saproc.make 2018-09-10 16:45:58.798316322 +0100 -+++ openjdk/hotspot/make/linux/makefiles/saproc.make 2018-09-10 16:55:19.785492708 +0100 -@@ -73,7 +73,7 @@ - else - ALT_SAINCDIR= - endif --SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) -+SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS) - - SAARCH ?= $(BUILDARCH) - -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2018-09-10 16:45:58.834315755 +0100 -+++ openjdk/hotspot/make/linux/makefiles/vm.make 2018-09-10 16:55:19.785492708 +0100 -@@ -130,7 +130,7 @@ - - # Extra flags from gnumake's invocation or environment - CFLAGS += $(EXTRA_CFLAGS) --LFLAGS += $(EXTRA_CFLAGS) -+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) - - # Don't set excutable bit on stack segment - # the same could be done by separate execstack command
--- a/patches/hotspot/aarch32/pr3593.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/pr3593.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,151 +1,1 @@ -# HG changeset patch -# User andrew -# Date 1526788009 -3600 -# Sun May 20 04:46:49 2018 +0100 -# Node ID 999983606f5c61b093c6f6316a7b26c4cd4ca79e -# Parent 7f6e1069a5719c8908b53774d3560ce851c7cd70 -PR3593: s390 needs to use '%z' format specifier for size_t arguments as size_t != int - -diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp ---- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.cpp -+++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp -@@ -977,7 +977,7 @@ - for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) { - CodeSection* sect = code_section(n); - if (!sect->is_allocated() || sect->is_empty()) continue; -- xtty->print_cr("<sect index='%d' size='" SIZE_FORMAT "' free='" SIZE_FORMAT "'/>", -+ xtty->print_cr("<sect index='%d' size='" INTX_FORMAT "' free='" INTX_FORMAT "'/>", - n, sect->limit() - sect->start(), sect->limit() - sect->end()); - } - xtty->print_cr("</blob>"); -diff --git openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp openjdk/hotspot/src/share/vm/code/codeCache.cpp ---- openjdk.orig/hotspot/src/share/vm/code/codeCache.cpp -+++ openjdk/hotspot/src/share/vm/code/codeCache.cpp -@@ -191,7 +191,7 @@ - } - if (PrintCodeCacheExtension) { - ResourceMark rm; -- tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)", -+ tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" INTX_FORMAT " bytes)", - (intptr_t)_heap->low_boundary(), (intptr_t)_heap->high(), - (address)_heap->high() - (address)_heap->low_boundary()); - } -diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp -+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp -@@ -598,7 +598,7 @@ - " [Table]\n" - " [Memory Usage: "G1_STRDEDUP_BYTES_FORMAT_NS"]\n" - " [Size: "SIZE_FORMAT", Min: "SIZE_FORMAT", Max: "SIZE_FORMAT"]\n" -- " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " UINTX_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" -+ " [Entries: "UINTX_FORMAT", Load: "G1_STRDEDUP_PERCENT_FORMAT_NS", Cached: " SIZE_FORMAT ", Added: "UINTX_FORMAT", Removed: "UINTX_FORMAT"]\n" - " [Resize Count: "UINTX_FORMAT", Shrink Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS"), Grow Threshold: "UINTX_FORMAT"("G1_STRDEDUP_PERCENT_FORMAT_NS")]\n" - " [Rehash Count: "UINTX_FORMAT", Rehash Threshold: "UINTX_FORMAT", Hash Seed: 0x%x]\n" - " [Age Threshold: "UINTX_FORMAT"]", -diff --git openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp ---- openjdk.orig/hotspot/src/share/vm/memory/blockOffsetTable.cpp -+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp -@@ -57,7 +57,7 @@ - gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: "); - gclog_or_tty->print_cr(" " - " rs.base(): " INTPTR_FORMAT -- " rs.size(): " INTPTR_FORMAT -+ " rs.size(): " SIZE_FORMAT - " rs end(): " INTPTR_FORMAT, - p2i(rs.base()), rs.size(), p2i(rs.base() + rs.size())); - gclog_or_tty->print_cr(" " -diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp ---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp -@@ -1056,7 +1056,8 @@ - size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size); - assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); - assert(FLAG_IS_ERGO(NewSize) && NewSize == expected, -- err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize)); -+ err_msg("NewSize should have been set ergonomically to " SIZE_FORMAT ", but was " UINTX_FORMAT, -+ expected, NewSize)); - } - - private: -diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp -@@ -1288,14 +1288,14 @@ - } - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize); -+ tty->print_cr("CMS ergo set MaxNewSize: " UINTX_FORMAT, MaxNewSize); - } - - // Code along this path potentially sets NewSize and OldSize - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT -- " initial_heap_size: " SIZE_FORMAT -+ tty->print_cr("CMS set min_heap_size: " UINTX_FORMAT -+ " initial_heap_size: " UINTX_FORMAT - " max_heap: " SIZE_FORMAT, - min_heap_size(), InitialHeapSize, max_heap); - } -@@ -1311,7 +1311,7 @@ - FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize)); - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize); -+ tty->print_cr("CMS ergo set NewSize: " UINTX_FORMAT, NewSize); - } - } - // Unless explicitly requested otherwise, size old gen -@@ -1321,7 +1321,7 @@ - FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, (uintx) (max_heap - NewSize))); - if (PrintGCDetails && Verbose) { - // Too early to use gclog_or_tty -- tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize); -+ tty->print_cr("CMS ergo set OldSize: " UINTX_FORMAT, OldSize); - } - } - } -@@ -1865,7 +1865,7 @@ - - if (PrintGCDetails && Verbose) { - // Cannot use gclog_or_tty yet. -- tty->print_cr(" Initial heap size " SIZE_FORMAT, (uintx)reasonable_initial); -+ tty->print_cr(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial); - } - FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial); - } -@@ -1875,7 +1875,7 @@ - set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize)); - if (PrintGCDetails && Verbose) { - // Cannot use gclog_or_tty yet. -- tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size()); -+ tty->print_cr(" Minimum heap size " UINTX_FORMAT, min_heap_size()); - } - } - } -diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp ---- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp -+++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp -@@ -1388,12 +1388,21 @@ - - #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR - -+#if defined(S390) && !defined(_LP64) -+#define SSIZE_FORMAT "%z" PRIdPTR -+#define SIZE_FORMAT "%z" PRIuPTR -+#define SIZE_FORMAT_HEX "0x%z" PRIxPTR -+#define SSIZE_FORMAT_W(width) "%" #width "z" PRIdPTR -+#define SIZE_FORMAT_W(width) "%" #width "z" PRIuPTR -+#define SIZE_FORMAT_HEX_W(width) "0x%" #width "z" PRIxPTR -+#else // !S390 - #define SSIZE_FORMAT "%" PRIdPTR - #define SIZE_FORMAT "%" PRIuPTR - #define SIZE_FORMAT_HEX "0x%" PRIxPTR - #define SSIZE_FORMAT_W(width) "%" #width PRIdPTR - #define SIZE_FORMAT_W(width) "%" #width PRIuPTR - #define SIZE_FORMAT_HEX_W(width) "0x%" #width PRIxPTR -+#endif // S390 - - #define INTX_FORMAT "%" PRIdPTR - #define UINTX_FORMAT "%" PRIuPTR +../shenandoah/pr3593.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/pr3607.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/pr3607.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,52 +1,1 @@ -# HG changeset patch -# User andrew -# Date 1533744073 -3600 -# Wed Aug 08 17:01:13 2018 +0100 -# Node ID 0458118b5f190097099f2ea7b025cb2d5aeb0429 -# Parent 66087a86ded39c2595dc61223fa03671ff051e33 -PR3607: CVE-2018-3639 hw: cpu: speculative store bypass mitigation - -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -103,6 +103,8 @@ - # include <inttypes.h> - # include <sys/ioctl.h> - -+#include <sys/prctl.h> -+ - PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC - - #ifndef _GNU_SOURCE -@@ -4995,6 +4997,31 @@ - } - } - -+/* Per task speculation control */ -+#ifndef PR_GET_SPECULATION_CTRL -+#define PR_GET_SPECULATION_CTRL 52 -+#endif -+#ifndef PR_SET_SPECULATION_CTRL -+#define PR_SET_SPECULATION_CTRL 53 -+#endif -+/* Speculation control variants */ -+# undef PR_SPEC_STORE_BYPASS -+# define PR_SPEC_STORE_BYPASS 0 -+/* Return and control values for PR_SET/GET_SPECULATION_CTRL */ -+# undef PR_SPEC_NOT_AFFECTED -+# undef PR_SPEC_PRCTL -+# undef PR_SPEC_ENABLE -+# undef PR_SPEC_DISABLE -+# define PR_SPEC_NOT_AFFECTED 0 -+# define PR_SPEC_PRCTL (1UL << 0) -+# define PR_SPEC_ENABLE (1UL << 1) -+# define PR_SPEC_DISABLE (1UL << 2) -+ -+static void set_speculation() __attribute__((constructor)); -+static void set_speculation() { -+ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); -+} -+ - // this is called _before_ the most of global arguments have been parsed - void os::init(void) { - char dummy; /* used to get a guess on initial stack address */ +../shenandoah/pr3607.patch \ No newline at end of file
--- a/patches/hotspot/aarch32/werror.patch Mon Feb 04 03:04:04 2019 +0000 +++ b/patches/hotspot/aarch32/werror.patch Mon Feb 04 05:38:49 2019 +0000 @@ -1,51 +1,1 @@ -# HG changeset patch -# User andrew -# Date 1408489026 -3600 -# Tue Aug 19 23:57:06 2014 +0100 -# Node ID 22d29c372fc4271930e4169a66818f67e27cf6e8 -# Parent c75d6ce2e98b901b31ac84dbbb59667e03beb9d5 -Merge jdk8u20-b23 - -diff -r c75d6ce2e98b -r 22d29c372fc4 make/linux/makefiles/gcc.make ---- openjdk/hotspot/make/linux/makefiles/gcc.make Tue Aug 19 22:31:00 2014 +0100 -+++ openjdk/hotspot/make/linux/makefiles/gcc.make Tue Aug 19 23:57:06 2014 +0100 -@@ -206,7 +206,9 @@ - endif - - # Compiler warnings are treated as errors -+ifneq ($(COMPILER_WARNINGS_FATAL),false) - WARNINGS_ARE_ERRORS = -Werror -+endif - - ifeq ($(USE_CLANG), true) - # However we need to clean the code up before we can unrestrictedly enable this option with Clang -diff -r c75d6ce2e98b -r 22d29c372fc4 make/solaris/makefiles/adlc.make ---- openjdk/hotspot/make/solaris/makefiles/adlc.make Tue Aug 19 22:31:00 2014 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/adlc.make Tue Aug 19 23:57:06 2014 +0100 -@@ -73,8 +73,10 @@ - - # CFLAGS_WARN holds compiler options to suppress/enable warnings. - # Compiler warnings are treated as errors --ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) -- CFLAGS_WARN = +w -errwarn -+ifneq ($(COMPILER_WARNINGS_FATAL),false) -+ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) -+ CFLAGS_WARN = +w -errwarn -+ endif - endif - CFLAGS += $(CFLAGS_WARN) - -diff -r c75d6ce2e98b -r 22d29c372fc4 make/solaris/makefiles/gcc.make ---- openjdk/hotspot/make/solaris/makefiles/gcc.make Tue Aug 19 22:31:00 2014 +0100 -+++ openjdk/hotspot/make/solaris/makefiles/gcc.make Tue Aug 19 23:57:06 2014 +0100 -@@ -116,7 +116,9 @@ - - - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+ifneq ($(COMPILER_WARNINGS_FATAL),false) -+WARNINGS_ARE_ERRORS = -Werror -+endif - # Enable these warnings. See 'info gcc' about details on these options - WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef - CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) +../shenandoah/werror.patch \ No newline at end of file