add fix-jck-failure-on-FastSerializer.patch && 8240360-NativeLibraryEvent-has-wrong-library-name-on-linux.patch
This commit is contained in:
parent
cf68b41a89
commit
1b48ab89e3
@ -0,0 +1,49 @@
|
||||
From 06fb55216b96c8c9341265dbc4d441cbabd0a66d Mon Sep 17 00:00:00 2001
|
||||
Date: Fri, 31 Jul 2020 15:50:08 +0800
|
||||
Subject: [PATCH] 8240360:NativeLibraryEvent has wrong library name on Linux
|
||||
|
||||
Summary: <jtreg>: <NativeLibraryEvent has wrong library name on Linux>
|
||||
LLT: jdk11u/test/jdk/jdk/jfr/event/runtime/TestNativeLibrariesEvent.java
|
||||
Bug url: https://bugs.openjdk.java.net/browse/JDK-8240360
|
||||
---
|
||||
src/hotspot/os/linux/os_linux.cpp | 20 +++++++++-----------
|
||||
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
|
||||
index 6ee57c1..a101d26 100644
|
||||
--- a/src/hotspot/os/linux/os_linux.cpp
|
||||
+++ b/src/hotspot/os/linux/os_linux.cpp
|
||||
@@ -2045,20 +2045,18 @@ int os::get_loaded_modules_info(os::LoadedModulesCallbackFunc callback, void *pa
|
||||
|
||||
// Read line by line from 'file'
|
||||
while (fgets(line, sizeof(line), procmapsFile) != NULL) {
|
||||
- u8 base, top, offset, inode;
|
||||
- char permissions[5];
|
||||
- char device[6];
|
||||
+ u8 base, top, inode;
|
||||
char name[sizeof(line)];
|
||||
|
||||
- // Parse fields from line
|
||||
- int matches = sscanf(line, UINT64_FORMAT_X "-" UINT64_FORMAT_X " %4s " UINT64_FORMAT_X " %5s " INT64_FORMAT " %s",
|
||||
- &base, &top, permissions, &offset, device, &inode, name);
|
||||
- // the last entry 'name' is empty for some entries, so we might have 6 matches instead of 7 for some lines
|
||||
- if (matches < 6) continue;
|
||||
- if (matches == 6) name[0] = '\0';
|
||||
+ // Parse fields from line, discard perms, offset and device
|
||||
+ int matches = sscanf(line, UINT64_FORMAT_X "-" UINT64_FORMAT_X " %*s %*s %*s " INT64_FORMAT " %s",
|
||||
+ &base, &top, &inode, name);
|
||||
+ // the last entry 'name' is empty for some entries, so we might have 3 matches instead of 4 for some lines
|
||||
+ if (matches < 3) continue;
|
||||
+ if (matches == 3) name[0] = '\0';
|
||||
|
||||
- // Filter by device id '00:00' so that we only get file system mapped files.
|
||||
- if (strcmp(device, "00:00") != 0) {
|
||||
+ // Filter by inode 0 so that we only get file system mapped files.
|
||||
+ if (inode != 0) {
|
||||
|
||||
// Call callback with the fields of interest
|
||||
if(callback(name, (address)base, (address)top, param)) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
88
fix-jck-failure-on-FastSerializer.patch
Normal file
88
fix-jck-failure-on-FastSerializer.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From cd63946e80ceb3f9de8a1ee02b38548c06cf532a Mon Sep 17 00:00:00 2001
|
||||
Date: Thu, 23 Jul 2020 16:40:31 +0800
|
||||
Subject: [PATCH] fix jck failure on FastSerializer
|
||||
|
||||
Summary: <core-libs>: <fix jck failure on FastSerializer>
|
||||
LLT: jck
|
||||
Bug url: NA
|
||||
---
|
||||
src/java.base/share/classes/java/io/ObjectInputStream.java | 7 ++++++-
|
||||
src/java.base/share/classes/java/io/ObjectOutputStream.java | 5 +++++
|
||||
src/java.base/share/classes/java/io/ObjectStreamClass.java | 2 +-
|
||||
src/java.base/share/classes/java/io/ObjectStreamConstants.java | 5 -----
|
||||
4 files changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/java.base/share/classes/java/io/ObjectInputStream.java b/src/java.base/share/classes/java/io/ObjectInputStream.java
|
||||
index d71d44a..a48e50c 100644
|
||||
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java
|
||||
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java
|
||||
@@ -381,6 +381,11 @@ public class ObjectInputStream
|
||||
"printFastSerializer")).booleanValue();
|
||||
|
||||
/**
|
||||
+ * Magic number that is written to the stream header when using fastserilizer.
|
||||
+ */
|
||||
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
|
||||
+
|
||||
+ /**
|
||||
* Creates an ObjectInputStream that reads from the specified InputStream.
|
||||
* A serialization stream header is read from the stream and verified.
|
||||
* This constructor will block until the corresponding ObjectOutputStream
|
||||
@@ -752,7 +757,7 @@ public class ObjectInputStream
|
||||
* Cache the class meta during serialization.
|
||||
* Only used in FastSerilizer.
|
||||
*/
|
||||
- protected static ConcurrentHashMap<String,Class<?>> nameToClass = new ConcurrentHashMap<>();
|
||||
+ private static ConcurrentHashMap<String,Class<?>> nameToClass = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Load the local class equivalent of the specified stream class
|
||||
diff --git a/src/java.base/share/classes/java/io/ObjectOutputStream.java b/src/java.base/share/classes/java/io/ObjectOutputStream.java
|
||||
index 8935e61..0e54763 100644
|
||||
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java
|
||||
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java
|
||||
@@ -251,6 +251,11 @@ public class ObjectOutputStream
|
||||
"printFastSerializer")).booleanValue();
|
||||
|
||||
/**
|
||||
+ * Magic number that is written to the stream header when using fastserilizer.
|
||||
+ */
|
||||
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
|
||||
+
|
||||
+ /**
|
||||
* Creates an ObjectOutputStream that writes to the specified OutputStream.
|
||||
* This constructor writes the serialization stream header to the
|
||||
* underlying stream; callers may wish to flush the stream immediately to
|
||||
diff --git a/src/java.base/share/classes/java/io/ObjectStreamClass.java b/src/java.base/share/classes/java/io/ObjectStreamClass.java
|
||||
index a5d7d2d..e37a784 100644
|
||||
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java
|
||||
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java
|
||||
@@ -280,7 +280,7 @@ public class ObjectStreamClass implements Serializable {
|
||||
*
|
||||
* @return the flags for this class described by this descriptor
|
||||
*/
|
||||
- public byte getFlags(Object serialStream) {
|
||||
+ byte getFlags(Object serialStream) {
|
||||
byte flags = 0;
|
||||
if (externalizable) {
|
||||
flags |= ObjectStreamConstants.SC_EXTERNALIZABLE;
|
||||
diff --git a/src/java.base/share/classes/java/io/ObjectStreamConstants.java b/src/java.base/share/classes/java/io/ObjectStreamConstants.java
|
||||
index 9615778..43a480c 100644
|
||||
--- a/src/java.base/share/classes/java/io/ObjectStreamConstants.java
|
||||
+++ b/src/java.base/share/classes/java/io/ObjectStreamConstants.java
|
||||
@@ -39,11 +39,6 @@ public interface ObjectStreamConstants {
|
||||
static final short STREAM_MAGIC = (short)0xaced;
|
||||
|
||||
/**
|
||||
- * Magic number that is written to the stream header when using fastserilizer.
|
||||
- */
|
||||
- static final short STREAM_MAGIC_FAST = (short)0xdeca;
|
||||
-
|
||||
- /**
|
||||
* Version number that is written to the stream header.
|
||||
*/
|
||||
static final short STREAM_VERSION = 5;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
@ -735,7 +735,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
|
||||
|
||||
Name: java-%{javaver}-%{origin}
|
||||
Version: %{newjavaver}.%{buildver}
|
||||
Release: 2
|
||||
Release: 3
|
||||
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
||||
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
||||
# also included the epoch in their virtual provides. This created a
|
||||
@ -816,6 +816,8 @@ Patch27: ZGC-aarch64-fix-not-using-load-store-Pre-index.patch
|
||||
Patch28: address-s-offset-may-exceed-the-limit-of-ldrw-instru.patch
|
||||
Patch29: ZGC-reuse-entries-of-ResolvedMethodTable.patch
|
||||
Patch30: fast-serializer-jdk11.patch
|
||||
Patch31: fix-jck-failure-on-FastSerializer.patch
|
||||
Patch32: 8240360-NativeLibraryEvent-has-wrong-library-name-on-linux.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: alsa-lib-devel
|
||||
@ -1065,6 +1067,8 @@ pushd %{top_level_dir_name}
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
popd # openjdk
|
||||
|
||||
%patch1000
|
||||
@ -1567,6 +1571,10 @@ require "copy_jdk_configs.lua"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 25 2020 noah <hedongbo@huawei.com> - 1:11.0.8.10-3
|
||||
- add fix-jck-failure-on-FastSerializer.patch
|
||||
- add 8240360-NativeLibraryEvent-has-wrong-library-name-on-linux.patch
|
||||
|
||||
* Mon Jul 20 2020 jdkboy <guoge1@huawei.com> - 1:11.0.8.10-2
|
||||
- add fast-serializer-jdk11.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user