Mercurial > hg > icedtea8
changeset 2878:264e472a8d18
Bump shenandoah to aarch64-shenandoah-jdk8u192-b13.
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
- S8141491: Unaligned memory access in Bits.c
- 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: [AArch64] Inconsistent types for ideal_reg
- 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: [AArch64] Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
- 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
- S8199552: Update to build scripts
- 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
- S8205714: Initial class initialization
- 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
- S8209414: AArch64: method handle invocation does not respect JVMTI interp_only mode
- S8210094: Better loading of classloader classes
ChangeLog:
2019-01-30 Andrew John Hughes <gnu_andrew@member.fsf.org>
Bump shenandoah to aarch64-shenandoah-jdk8u192-b13.
* patches/hotspot/shenandoah/8008321-pr3599.patch,
* patches/hotspot/shenandoah/8185723-pr3553.patch,
* patches/hotspot/shenandoah/8186461-pr3557.patch,
* patches/hotspot/shenandoah/8201509-pr3579.patch,
* patches/hotspot/shenandoah/8206406-pr3610-rh1597825.patch,
* patches/hotspot/shenandoah/pr3539-rh1548475.patch:
Remove patches now upstream.
* Makefile.am:
(ICEDTEA_PATCHES): Move upstreamed Shenandoah patches to
AArch32-only section.
* NEWS: Updated.
* hotspot.map.in: Bump shenandoah to
aarch64-shenandoah-jdk8u192-b13.
* patches/hotspot/aarch32/8008321-pr3599.patch:
Replace symlink with a copy as Shenandoah version removed.
* patches/hotspot/aarch32/8141491-pr3159-g592292.patch,
* patches/hotspot/aarch32/8143245-pr3548.patch,
* patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch:
Replace symlinks with copies of pre-8u192 versions.
* patches/hotspot/aarch32/8185723-pr3553.patch,
* patches/hotspot/aarch32/8186461-pr3557.patch:
Replace symlink with a copy as Shenandoah version removed.
* patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch:
Replace symlink with copy of pre-8u192 version.
* patches/hotspot/aarch32/8201509-pr3579.patch,
* patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch,
* patches/hotspot/aarch32/pr3539-rh1548475.patch:
Replace symlink with a copy as Shenandoah version removed.
* patches/hotspot/aarch32/pr3593.patch,
* patches/hotspot/aarch32/pr3607.patch,
* patches/hotspot/aarch32/werror.patch,
Replace symlinks with copies of pre-8u192 versions.
* patches/hotspot/shenandoah/8141491-pr3159-g592292.patch,
* patches/hotspot/shenandoah/8143245-pr3548.patch,
* patches/hotspot/shenandoah/8158260-pr2991-rh1341258.patch,
* patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch,
* patches/hotspot/shenandoah/pr1368.patch,
* patches/hotspot/shenandoah/pr3559.patch,
* patches/hotspot/shenandoah/pr3593.patch,
* patches/hotspot/shenandoah/pr3607.patch,
* patches/hotspot/shenandoah/werror.patch:
Adjusted to apply against aarch64-shenandoah-jdk8u192-b13.
line wrap: on
line diff
--- a/ChangeLog Wed Jan 23 19:59:13 2019 +0000 +++ b/ChangeLog Mon Feb 04 02:18:03 2019 +0000 @@ -1,3 +1,49 @@ +2019-01-30 Andrew John Hughes <gnu_andrew@member.fsf.org> + + Bump shenandoah to aarch64-shenandoah-jdk8u192-b13. + * patches/hotspot/shenandoah/8008321-pr3599.patch, + * patches/hotspot/shenandoah/8185723-pr3553.patch, + * patches/hotspot/shenandoah/8186461-pr3557.patch, + * patches/hotspot/shenandoah/8201509-pr3579.patch, + * patches/hotspot/shenandoah/8206406-pr3610-rh1597825.patch, + * patches/hotspot/shenandoah/pr3539-rh1548475.patch: + Remove patches now upstream. + * Makefile.am: + (ICEDTEA_PATCHES): Move upstreamed Shenandoah patches to + AArch32-only section. + * NEWS: Updated. + * hotspot.map.in: Bump shenandoah to + aarch64-shenandoah-jdk8u192-b13. + * patches/hotspot/aarch32/8008321-pr3599.patch: + Replace symlink with a copy as Shenandoah version removed. + * patches/hotspot/aarch32/8141491-pr3159-g592292.patch, + * patches/hotspot/aarch32/8143245-pr3548.patch, + * patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch: + Replace symlinks with copies of pre-8u192 versions. + * patches/hotspot/aarch32/8185723-pr3553.patch, + * patches/hotspot/aarch32/8186461-pr3557.patch: + Replace symlink with a copy as Shenandoah version removed. + * patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch: + Replace symlink with copy of pre-8u192 version. + * patches/hotspot/aarch32/8201509-pr3579.patch, + * patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch, + * patches/hotspot/aarch32/pr3539-rh1548475.patch: + Replace symlink with a copy as Shenandoah version removed. + * patches/hotspot/aarch32/pr3593.patch, + * patches/hotspot/aarch32/pr3607.patch, + * patches/hotspot/aarch32/werror.patch, + Replace symlinks with copies of pre-8u192 versions. + * patches/hotspot/shenandoah/8141491-pr3159-g592292.patch, + * patches/hotspot/shenandoah/8143245-pr3548.patch, + * patches/hotspot/shenandoah/8158260-pr2991-rh1341258.patch, + * patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch, + * patches/hotspot/shenandoah/pr1368.patch, + * patches/hotspot/shenandoah/pr3559.patch, + * patches/hotspot/shenandoah/pr3593.patch, + * patches/hotspot/shenandoah/pr3607.patch, + * patches/hotspot/shenandoah/werror.patch: + Adjusted to apply against aarch64-shenandoah-jdk8u192-b13. + 2019-01-23 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump to icedtea-3.11.0pre02.
--- a/Makefile.am Wed Jan 23 19:59:13 2019 +0000 +++ b/Makefile.am Mon Feb 04 02:18:03 2019 +0000 @@ -350,8 +350,14 @@ 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)/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 endif ICEDTEA_PATCHES += \ @@ -376,20 +382,14 @@ patches/hotspot/$(HSBUILD)/8062808-pr3548.patch \ patches/hotspot/$(HSBUILD)/8141570-pr3548.patch \ patches/hotspot/$(HSBUILD)/8143245-pr3548.patch \ - patches/hotspot/$(HSBUILD)/8185723-pr3553.patch \ - patches/hotspot/$(HSBUILD)/8186461-pr3557.patch \ patches/hotspot/$(HSBUILD)/8197429-pr3546-rh1536622.patch \ patches/hotspot/$(HSBUILD)/pr3559.patch \ - patches/hotspot/$(HSBUILD)/8201509-pr3579.patch \ - patches/hotspot/$(HSBUILD)/pr3539-rh1548475.patch \ patches/hotspot/$(HSBUILD)/pr3593.patch \ patches/hotspot/$(HSBUILD)/8197981-pr3548.patch \ patches/hotspot/$(HSBUILD)/8184309-pr3596.patch \ patches/hotspot/$(HSBUILD)/pr3597.patch \ - patches/hotspot/$(HSBUILD)/8008321-pr3599.patch \ patches/hotspot/$(HSBUILD)/8064786-pr3601.patch \ patches/hotspot/$(HSBUILD)/pr3601.patch \ - patches/hotspot/$(HSBUILD)/8206406-pr3610-rh1597825.patch \ patches/hotspot/$(HSBUILD)/8207057-pr3613.patch \ patches/hotspot/$(HSBUILD)/pr3607.patch \ patches/hotspot/$(HSBUILD)/8131048-pr3574-rh1498936.patch \
--- a/NEWS Wed Jan 23 19:59:13 2019 +0000 +++ b/NEWS Mon Feb 04 02:18:03 2019 +0000 @@ -122,6 +122,11 @@ - S8160748, PR3682: [AArch64] Inconsistent types for ideal_reg - S8189170, PR3682: [AArch64] Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM - S8209414, PR3682: [AArch64] method handle invocation does not respect JVMTI interp_only mode +* Shenandoah + - S8199552: Update to build scripts + - S8203349: 8u hotspot should recognise later Windows compilers + - S8205714: Initial class initialization + - S8210094: Better loading of classloader classes New in release 3.10.0 (2018-12-25):
--- a/hotspot.map.in Wed Jan 23 19:59:13 2019 +0000 +++ b/hotspot.map.in Mon Feb 04 02:18:03 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@ bc4deb768b1d 9c7654b2a6574cef171999689bf938fcba4bba9bbd500c1daaafd3a25bf7c3f1 +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
--- a/patches/hotspot/aarch32/8008321-pr3599.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8008321-pr3599.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,41 @@ -../shenandoah/8008321-pr3599.patch \ No newline at end of file +# 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 Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8141491-pr3159-g592292.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,311 @@ -../shenandoah/8141491-pr3159-g592292.patch \ No newline at end of file +# 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
--- a/patches/hotspot/aarch32/8143245-pr3548.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8143245-pr3548.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,154 @@ -../shenandoah/8143245-pr3548.patch \ No newline at end of file +# 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
--- a/patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8158260-pr2991-rh1341258.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,467 @@ -../shenandoah/8158260-pr2991-rh1341258.patch \ No newline at end of file +# 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)); ++ } ++ } ++ } ++ ++}
--- a/patches/hotspot/aarch32/8185723-pr3553.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8185723-pr3553.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,27 @@ -../shenandoah/8185723-pr3553.patch \ No newline at end of file +# 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 Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8186461-pr3557.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,32 @@ -../shenandoah/8186461-pr3557.patch \ No newline at end of file +# 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 Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8197429-pr3546-rh1536622.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,273 @@ -../shenandoah/8197429-pr3546-rh1536622.patch \ No newline at end of file +# 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 $?
--- a/patches/hotspot/aarch32/8201509-pr3579.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8201509-pr3579.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,36 @@ -../shenandoah/8201509-pr3579.patch \ No newline at end of file +# 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 Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/8206406-pr3610-rh1597825.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,65 @@ -../shenandoah/8206406-pr3610-rh1597825.patch \ No newline at end of file +# 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/pr3539-rh1548475.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/pr3539-rh1548475.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,116 @@ -../shenandoah/pr3539-rh1548475.patch \ No newline at end of file +# 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 Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/pr3593.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,151 @@ -../shenandoah/pr3593.patch \ No newline at end of file +# 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
--- a/patches/hotspot/aarch32/pr3607.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/pr3607.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,52 @@ -../shenandoah/pr3607.patch \ No newline at end of file +# 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 */
--- a/patches/hotspot/aarch32/werror.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/aarch32/werror.patch Mon Feb 04 02:18:03 2019 +0000 @@ -1,1 +1,51 @@ -../shenandoah/werror.patch \ No newline at end of file +# 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)
--- a/patches/hotspot/shenandoah/8008321-pr3599.patch Wed Jan 23 19:59:13 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/shenandoah/8141491-pr3159-g592292.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/8141491-pr3159-g592292.patch Mon Feb 04 02:18:03 2019 +0000 @@ -8,10 +8,10 @@ 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 @@ +diff -Nru openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp openjdk/hotspot/src/share/vm/prims/unsafe.cpp +--- openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-25 15:09:02.521904826 +0000 ++++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-29 17:57:15.651251367 +0000 +@@ -737,6 +737,36 @@ Copy::conjoint_memory_atomic(src, dst, sz); UNSAFE_END @@ -48,17 +48,17 @@ ////// Random queries -@@ -1702,6 +1732,7 @@ +@@ -1712,6 +1742,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)} + {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 +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/interfaceSupport.hpp openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp +--- openjdk.orig/hotspot/src/share/vm/runtime/interfaceSupport.hpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp 2019-01-29 02:57:27.690537317 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. @@ -96,9 +96,9 @@ #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 +diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/copy.cpp openjdk/hotspot/src/share/vm/utilities/copy.cpp +--- openjdk.orig/hotspot/src/share/vm/utilities/copy.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/copy.cpp 2019-01-29 02:57:27.690537317 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. @@ -282,9 +282,9 @@ // 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 +diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp openjdk/hotspot/src/share/vm/utilities/copy.hpp +--- openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/copy.hpp 2019-01-29 02:57:27.690537317 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
--- a/patches/hotspot/shenandoah/8143245-pr3548.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/8143245-pr3548.patch Mon Feb 04 02:18:03 2019 +0000 @@ -7,9 +7,9 @@ 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 +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make +--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make 2019-01-29 19:24:20.912427991 +0000 ++++ openjdk/hotspot/make/linux/makefiles/zeroshark.make 2019-01-29 19:28:51.204181986 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. @@ -29,9 +29,9 @@ # 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 +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp 2019-01-29 19:28:51.208181923 +0000 @@ -100,7 +100,7 @@ case T_DOUBLE: case T_VOID: @@ -41,9 +41,9 @@ } } -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 +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp 2019-01-29 19:28:51.208181923 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -60,12 +60,12 @@ 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 +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2019-01-29 19:29:06.931934919 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, 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. @@ -126,17 +126,9 @@ } 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 +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp 2019-01-29 19:28:51.208181923 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
--- a/patches/hotspot/shenandoah/8158260-pr2991-rh1341258.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/8158260-pr2991-rh1341258.patch Mon Feb 04 02:18:03 2019 +0000 @@ -10,8 +10,8 @@ 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 +--- openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2019-01-25 13:46:51.799453897 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. @@ -34,16 +34,9 @@ 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 @@ +--- openjdk.orig/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp 2019-01-25 13:46:51.799453897 +0000 +@@ -375,6 +375,13 @@ (cache_line_size > ContendedPaddingWidth)) ContendedPaddingWidth = cache_line_size; @@ -58,8 +51,8 @@ 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 +--- openjdk.orig/hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/x86/vm/vm_version_x86.cpp 2019-01-25 13:46:51.799453897 +0000 @@ -1033,6 +1033,11 @@ (cache_line_size > ContendedPaddingWidth)) ContendedPaddingWidth = cache_line_size; @@ -73,8 +66,8 @@ 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 +--- openjdk.orig/hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/vm_version_zero.cpp 2019-01-25 13:46:51.799453897 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. @@ -96,9 +89,9 @@ + } +} 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 @@ +--- openjdk.orig/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/prims/unsafe.cpp 2019-01-25 13:50:10.160334728 +0000 +@@ -385,6 +385,24 @@ #endif // not SUPPORTS_NATIVE_CX8 @@ -123,20 +116,31 @@ #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)}, -+ +@@ -1716,6 +1734,11 @@ + {CC "fullFence", CC "()V", FN_PTR(Unsafe_FullFence)}, + }; + ++JNINativeMethod cpu_methods[] = { + {CC"isBigEndian0", CC"()Z", FN_PTR(Unsafe_isBigEndian0)}, + {CC"unalignedAccess0", CC"()Z", FN_PTR(Unsafe_unalignedAccess0)} - }; ++}; ++ + #undef CC + #undef FN_PTR + +@@ -1815,5 +1838,8 @@ - #undef CC + // Fence methods + register_natives("1.8 fence methods", env, unsafecls, fence_methods, sizeof(fence_methods)/sizeof(JNINativeMethod)); ++ ++ // CPU methods ++ register_natives("1.9 CPU methods", env, unsafecls, cpu_methods, sizeof(cpu_methods)/sizeof(JNINativeMethod)); + } + JVM_END diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp ---- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 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 @@ +--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2019-01-25 13:46:51.803453833 +0000 +@@ -4003,6 +4003,9 @@ product(bool, UseLockedTracing, false, \ "Use locked-tracing when doing event-based tracing") \ \ @@ -148,7 +152,7 @@ "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 ++++ openjdk/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeUnalignedAccess.java 2019-01-25 13:46:51.803453833 +0000 @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2016 SAP SE. All rights reserved.
--- a/patches/hotspot/shenandoah/8185723-pr3553.patch Wed Jan 23 19:59:13 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/shenandoah/8186461-pr3557.patch Wed Jan 23 19:59:13 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/shenandoah/8197429-pr3546-rh1536622.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/8197429-pr3546-rh1536622.patch Mon Feb 04 02:18:03 2019 +0000 @@ -7,10 +7,10 @@ 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 @@ +diff -Nru 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 2019-01-29 20:02:23.464569622 +0000 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2019-01-29 20:31:12.037413762 +0000 +@@ -724,6 +724,10 @@ } } @@ -21,17 +21,10 @@ 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 @@ +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp 2019-01-29 20:32:29.688193870 +0000 +@@ -249,6 +249,8 @@ static int safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime); private: @@ -40,17 +33,10 @@ 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 @@ +diff -Nru 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 2019-01-29 20:02:23.496569120 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2019-01-29 20:32:11.444480479 +0000 +@@ -893,6 +893,25 @@ void os::workaround_expand_exec_shield_cs_limit() { #if defined(IA32) && !defined(ZERO) size_t page_size = os::vm_page_size(); @@ -76,7 +62,7 @@ /* * Take the highest VA the OS will give us and exec * -@@ -910,6 +929,16 @@ +@@ -911,6 +930,16 @@ char* hint = (char*) (Linux::initial_thread_stack_bottom() - ((StackYellowPages + StackRedPages + 1) * page_size)); char* codebuf = os::attempt_reserve_memory_at(page_size, hint); @@ -93,48 +79,9 @@ 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 +diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c openjdk/hotspot/test/runtime/StackGap/exestack-gap.c +--- openjdk.orig/hotspot/test/runtime/StackGap/exestack-gap.c 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/hotspot/test/runtime/StackGap/exestack-gap.c 2019-01-29 20:31:12.037413762 +0000 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018, Red Hat, Inc. All rights reserved. @@ -218,10 +165,9 @@ + + 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 +diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/testme.sh openjdk/hotspot/test/runtime/StackGap/testme.sh +--- openjdk.orig/hotspot/test/runtime/StackGap/testme.sh 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/hotspot/test/runtime/StackGap/testme.sh 2019-01-29 20:31:12.037413762 +0000 @@ -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. @@ -271,3 +217,40 @@ +export LD_LIBRARY_PATH + +${TESTNATIVEPATH}/stack-gap || exit $? +diff -Nru openjdk.orig/hotspot/test/runtime/StackGap/T.java openjdk/hotspot/test/runtime/StackGap/T.java +--- openjdk.orig/hotspot/test/runtime/StackGap/T.java 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/hotspot/test/runtime/StackGap/T.java 2019-01-29 20:31:12.037413762 +0000 +@@ -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); ++ ++ } ++ ++}
--- a/patches/hotspot/shenandoah/8201509-pr3579.patch Wed Jan 23 19:59:13 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 --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 -@@ -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)); - #elif defined(__ARM_ARCH_7A__) - jlong tmp; - asm volatile ("ldrexd %0, [%1]\n"
--- a/patches/hotspot/shenandoah/8206406-pr3610-rh1597825.patch Wed Jan 23 19:59:13 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/shenandoah/pr1368.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/pr1368.patch Mon Feb 04 02:18:03 2019 +0000 @@ -6,9 +6,9 @@ # Parent e04f994581e23e89757774cd2033413bc650a831 PR1368: Ensure debug data is available for all libraries and binaries without redundant files -diff -r e04f994581e2 -r be477dd4629d make/aix/makefiles/defs.make ---- openjdk/hotspot/make/aix/makefiles/defs.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/aix/makefiles/defs.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/aix/makefiles/defs.make 2019-01-25 14:24:31.999871188 +0000 @@ -186,12 +186,14 @@ # client and server subdirectories have symbolic links to ../libjsig.so EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) @@ -53,9 +53,9 @@ endif # Serviceability Binaries -diff -r e04f994581e2 -r be477dd4629d make/aix/makefiles/jsig.make ---- openjdk/hotspot/make/aix/makefiles/jsig.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/aix/makefiles/jsig.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/aix/makefiles/jsig.make 2019-01-25 14:24:31.999871188 +0000 @@ -60,6 +60,7 @@ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl @@ -72,9 +72,9 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" -diff -r e04f994581e2 -r be477dd4629d make/aix/makefiles/saproc.make ---- openjdk/hotspot/make/aix/makefiles/saproc.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/aix/makefiles/saproc.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/aix/makefiles/saproc.make 2019-01-25 14:24:31.999871188 +0000 @@ -88,8 +88,10 @@ -o $@ \ -lthread_db @@ -97,9 +97,9 @@ endif endif -diff -r e04f994581e2 -r be477dd4629d make/aix/makefiles/vm.make ---- openjdk/hotspot/make/aix/makefiles/vm.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/aix/makefiles/vm.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/aix/makefiles/vm.make 2019-01-25 14:24:31.999871188 +0000 @@ -330,6 +330,7 @@ # } @@ -116,9 +116,9 @@ DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) -diff -r e04f994581e2 -r be477dd4629d make/bsd/makefiles/defs.make ---- openjdk/hotspot/make/bsd/makefiles/defs.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/bsd/makefiles/defs.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/bsd/makefiles/defs.make 2019-01-25 14:24:31.999871188 +0000 @@ -269,6 +269,7 @@ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) @@ -207,12 +207,12 @@ endif endif -diff -r e04f994581e2 -r be477dd4629d make/bsd/makefiles/jsig.make ---- openjdk/hotspot/make/bsd/makefiles/jsig.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/bsd/makefiles/jsig.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/bsd/makefiles/jsig.make 2019-01-25 14:29:06.939548251 +0000 @@ -64,6 +64,7 @@ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< + $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) +ifneq ($(STRIP_POLICY),no_strip) ifeq ($(OS_VENDOR), Darwin) @@ -226,9 +226,9 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" -diff -r e04f994581e2 -r be477dd4629d make/bsd/makefiles/saproc.make ---- openjdk/hotspot/make/bsd/makefiles/saproc.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/bsd/makefiles/saproc.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/bsd/makefiles/saproc.make 2019-01-25 14:24:31.999871188 +0000 @@ -137,6 +137,7 @@ -o $@ \ $(SALIBS) @@ -245,9 +245,9 @@ install_saproc: $(BUILDLIBSAPROC) @echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)" -diff -r e04f994581e2 -r be477dd4629d make/bsd/makefiles/vm.make ---- openjdk/hotspot/make/bsd/makefiles/vm.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/bsd/makefiles/vm.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/bsd/makefiles/vm.make 2019-01-25 14:24:31.999871188 +0000 @@ -342,6 +342,7 @@ } @@ -264,166 +264,9 @@ DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR) DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM) -diff -r e04f994581e2 -r be477dd4629d make/linux/makefiles/defs.make ---- openjdk/hotspot/make/linux/makefiles/defs.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/linux/makefiles/defs.make Mon Jan 11 17:16:42 2016 +0000 -@@ -252,12 +252,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 -@@ -266,24 +268,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) -@@ -291,12 +297,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 -@@ -308,6 +316,7 @@ - ADD_SA_BINARIES/aarch64 = $(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 -@@ -316,6 +325,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 -r e04f994581e2 -r be477dd4629d make/linux/makefiles/jsig.make ---- openjdk/hotspot/make/linux/makefiles/jsig.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/linux/makefiles/jsig.make Mon Jan 11 17:16:42 2016 +0000 -@@ -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 -r e04f994581e2 -r be477dd4629d make/linux/makefiles/saproc.make ---- openjdk/hotspot/make/linux/makefiles/saproc.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/linux/makefiles/saproc.make Mon Jan 11 17:16:42 2016 +0000 -@@ -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 -r e04f994581e2 -r be477dd4629d make/linux/makefiles/vm.make ---- openjdk/hotspot/make/linux/makefiles/vm.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/linux/makefiles/vm.make Mon Jan 11 17:16:42 2016 +0000 -@@ -417,8 +417,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 -@@ -427,10 +429,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 -r e04f994581e2 -r be477dd4629d make/solaris/makefiles/defs.make ---- openjdk/hotspot/make/solaris/makefiles/defs.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/solaris/makefiles/defs.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/defs.make 2019-01-25 14:24:31.999871188 +0000 @@ -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) @@ -476,9 +319,9 @@ ifeq ($(ZIP_DEBUGINFO_FILES),1) EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz else -diff -r e04f994581e2 -r be477dd4629d make/solaris/makefiles/jsig.make ---- openjdk/hotspot/make/solaris/makefiles/jsig.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/solaris/makefiles/jsig.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/jsig.make 2019-01-25 14:24:31.999871188 +0000 @@ -52,8 +52,10 @@ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ $(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl @@ -503,9 +346,9 @@ endif install_jsig: $(LIBJSIG) -diff -r e04f994581e2 -r be477dd4629d make/solaris/makefiles/saproc.make ---- openjdk/hotspot/make/solaris/makefiles/saproc.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/solaris/makefiles/saproc.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/saproc.make 2019-01-25 14:24:31.999871188 +0000 @@ -121,8 +121,10 @@ -c -o $(SADISOBJ) @@ -528,10 +371,10 @@ endif endif -diff -r e04f994581e2 -r be477dd4629d make/solaris/makefiles/vm.make ---- openjdk/hotspot/make/solaris/makefiles/vm.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/solaris/makefiles/vm.make Mon Jan 11 17:16:42 2016 +0000 -@@ -307,8 +307,10 @@ +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/vm.make 2019-01-25 14:24:32.003871126 +0000 +@@ -299,8 +299,10 @@ $(QUIETLY) $(LINK_LIB.CXX/POST_HOOK) $(QUIETLY) rm -f $@.1 && ln -s $@ $@.1 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) @@ -542,7 +385,7 @@ ifeq ($(STRIP_POLICY),all_strip) $(QUIETLY) $(STRIP) $@ else -@@ -317,10 +319,12 @@ +@@ -309,10 +311,12 @@ # implied else here is no stripping at all endif endif @@ -555,9 +398,9 @@ endif endif # filter -sbfast -xsbfast -diff -r e04f994581e2 -r be477dd4629d make/windows/makefiles/debug.make ---- openjdk/hotspot/make/windows/makefiles/debug.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/windows/makefiles/debug.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/windows/makefiles/debug.make 2019-01-25 14:24:32.003871126 +0000 @@ -60,11 +60,13 @@ $(MT) /manifest $@.manifest /outputresource:$@;#2 !endif @@ -572,9 +415,9 @@ !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -r e04f994581e2 -r be477dd4629d make/windows/makefiles/defs.make ---- openjdk/hotspot/make/windows/makefiles/defs.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/windows/makefiles/defs.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/windows/makefiles/defs.make 2019-01-25 14:24:32.003871126 +0000 @@ -253,6 +253,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX) @@ -621,9 +464,9 @@ EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar # Must pass this down to nmake. MAKE_ARGS += BUILD_WIN_SA=1 -diff -r e04f994581e2 -r be477dd4629d make/windows/makefiles/fastdebug.make ---- openjdk/hotspot/make/windows/makefiles/fastdebug.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/windows/makefiles/fastdebug.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/windows/makefiles/fastdebug.make 2019-01-25 14:24:32.003871126 +0000 @@ -59,11 +59,13 @@ $(MT) /manifest $@.manifest /outputresource:$@;#2 !endif @@ -638,9 +481,9 @@ !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -r e04f994581e2 -r be477dd4629d make/windows/makefiles/product.make ---- openjdk/hotspot/make/windows/makefiles/product.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/windows/makefiles/product.make Mon Jan 11 17:16:42 2016 +0000 +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/windows/makefiles/product.make 2019-01-25 14:24:32.003871126 +0000 @@ -62,11 +62,13 @@ $(MT) /manifest $@.manifest /outputresource:$@;#2 !endif @@ -655,10 +498,10 @@ !include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/sa.make -diff -r e04f994581e2 -r be477dd4629d make/windows/makefiles/sa.make ---- openjdk/hotspot/make/windows/makefiles/sa.make Tue Dec 08 03:10:43 2015 +0000 -+++ openjdk/hotspot/make/windows/makefiles/sa.make Mon Jan 11 17:16:42 2016 +0000 -@@ -152,11 +152,13 @@ +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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/windows/makefiles/sa.make 2019-01-25 14:24:32.003871126 +0000 +@@ -154,11 +154,13 @@ $(MT) -manifest $(@F).manifest -outputresource:$(@F);#2 !endif !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
--- a/patches/hotspot/shenandoah/pr3539-rh1548475.patch Wed Jan 23 19:59:13 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/shenandoah/pr3559.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/pr3559.patch Mon Feb 04 02:18:03 2019 +0000 @@ -11,13 +11,13 @@ * os_linux_zero.hpp (atomic_copy64): Use ldrexd for atomic reads on ARMv7. -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 +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-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2019-01-31 03:47:46.786028653 +0000 @@ -54,6 +54,12 @@ - "std %0, 0(%2)\n" - : "=r"(tmp) - : "a"(src), "a"(dst)); + "std %0, %1\n" + : "=&f"(tmp), "=Q"(*(volatile double*)dst) + : "Q"(*(volatile double*)src)); +#elif defined(__ARM_ARCH_7A__) + jlong tmp; + asm volatile ("ldrexd %0, [%1]\n"
--- a/patches/hotspot/shenandoah/pr3593.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/pr3593.patch Mon Feb 04 02:18:03 2019 +0000 @@ -6,9 +6,9 @@ # 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 +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.cpp 2019-01-31 04:10:34.516469599 +0000 @@ -977,7 +977,7 @@ for (int n = (int) CodeBuffer::SECT_FIRST; n < (int) CodeBuffer::SECT_LIMIT; n++) { CodeSection* sect = code_section(n); @@ -18,10 +18,10 @@ 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 @@ +diff -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/code/codeCache.cpp 2019-01-31 04:10:34.516469599 +0000 +@@ -192,7 +192,7 @@ } if (PrintCodeCacheExtension) { ResourceMark rm; @@ -30,21 +30,21 @@ (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 +diff -Nru 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 2019-01-31 04:09:27.637523788 +0000 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2019-01-31 04:11:36.563491574 +0000 @@ -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 + " [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 -Nru 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 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.cpp 2019-01-31 04:10:34.516469599 +0000 @@ -57,7 +57,7 @@ gclog_or_tty->print_cr("BlockOffsetSharedArray::BlockOffsetSharedArray: "); gclog_or_tty->print_cr(" " @@ -54,9 +54,9 @@ " 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 +diff -Nru 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 2019-01-31 04:09:27.641523725 +0000 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2019-01-31 04:10:34.516469599 +0000 @@ -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)); @@ -67,10 +67,10 @@ } 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 @@ +diff -Nru 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 2019-01-31 04:09:27.641523725 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2019-01-31 04:10:34.520469536 +0000 +@@ -1291,14 +1291,14 @@ } if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -88,7 +88,7 @@ " max_heap: " SIZE_FORMAT, min_heap_size(), InitialHeapSize, max_heap); } -@@ -1311,7 +1311,7 @@ +@@ -1314,7 +1314,7 @@ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize)); if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -97,7 +97,7 @@ } } // Unless explicitly requested otherwise, size old gen -@@ -1321,7 +1321,7 @@ +@@ -1324,7 +1324,7 @@ FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, (uintx) (max_heap - NewSize))); if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty @@ -106,7 +106,7 @@ } } } -@@ -1865,7 +1865,7 @@ +@@ -2043,7 +2043,7 @@ if (PrintGCDetails && Verbose) { // Cannot use gclog_or_tty yet. @@ -115,7 +115,7 @@ } FLAG_SET_ERGO(uintx, InitialHeapSize, (uintx)reasonable_initial); } -@@ -1875,7 +1875,7 @@ +@@ -2053,7 +2053,7 @@ set_min_heap_size(MIN2((uintx)reasonable_minimum, InitialHeapSize)); if (PrintGCDetails && Verbose) { // Cannot use gclog_or_tty yet. @@ -124,10 +124,10 @@ } } } -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 @@ +diff -Nru 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 2019-01-31 04:09:26.369543774 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp 2019-01-31 04:10:34.520469536 +0000 +@@ -1389,12 +1389,21 @@ #define INTPTR_FORMAT_W(width) "%" #width PRIxPTR
--- a/patches/hotspot/shenandoah/pr3607.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/pr3607.patch Mon Feb 04 02:18:03 2019 +0000 @@ -6,9 +6,9 @@ # 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 +diff -Nru 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 2019-01-31 04:18:03.357394677 +0000 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2019-01-31 04:19:59.099570272 +0000 @@ -103,6 +103,8 @@ # include <inttypes.h> # include <sys/ioctl.h> @@ -18,7 +18,7 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC #ifndef _GNU_SOURCE -@@ -4995,6 +4997,31 @@ +@@ -5001,6 +5003,31 @@ } } @@ -47,6 +47,6 @@ + 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 + // this is called _before_ most of the global arguments have been parsed void os::init(void) { char dummy; /* used to get a guess on initial stack address */
--- a/patches/hotspot/shenandoah/werror.patch Wed Jan 23 19:59:13 2019 +0000 +++ b/patches/hotspot/shenandoah/werror.patch Mon Feb 04 02:18:03 2019 +0000 @@ -6,10 +6,10 @@ # 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 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2019-01-25 15:02:27.660107711 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2019-01-25 15:05:30.485236897 +0000 +@@ -198,7 +198,9 @@ endif # Compiler warnings are treated as errors @@ -19,9 +19,9 @@ 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 +diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make +--- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/adlc.make 2019-01-25 15:06:44.376075821 +0000 @@ -73,8 +73,10 @@ # CFLAGS_WARN holds compiler options to suppress/enable warnings. @@ -33,11 +33,11 @@ + 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 + # When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly + # instantiated template functions trigger this warning when +w is active. +diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make +--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make 2019-01-16 07:13:59.000000000 +0000 ++++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2019-01-25 15:05:30.485236897 +0000 @@ -116,7 +116,9 @@