!34 add add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch

From: @jvmboy
Reviewed-by: @jdkboy
Signed-off-by: @jdkboy
This commit is contained in:
openeuler-ci-bot 2020-09-21 16:55:43 +08:00 committed by Gitee
commit 9f73e476b3
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,25 @@
commit e1db4422be08222e4d5cf9fbfe8b8a61583976d2
Date: Tue Sep 15 20:58:00 2020 +0800
add DumpSharedSpace guarantee when create anonymous classes
Summary: < JDK> : add DumpSharedSpace guarantee when create anonymous classes
LLT: NA
Bug url: NA
diff --git a/hotspot/src/share/vm/prims/unsafe.cpp b/hotspot/src/share/vm/prims/unsafe.cpp
index f20bf3d2b..3ab82c5c4 100644
--- a/hotspot/src/share/vm/prims/unsafe.cpp
+++ b/hotspot/src/share/vm/prims/unsafe.cpp
@@ -1058,6 +1058,11 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
HeapWord* *temp_alloc,
TRAPS) {
+ if (DumpSharedSpaces) {
+ tty->print_cr("failed: must not create anonymous classes when dumping.");
+ JVM_Exit(0);
+ }
+
if (UsePerfData) {
ClassLoader::unsafe_defineClassCallCounter()->inc();
}

View File

@ -915,7 +915,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver} Version: %{javaver}.%{updatever}.%{buildver}
Release: 5 Release: 6
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # 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 # 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 # also included the epoch in their virtual provides. This created a
@ -1064,6 +1064,7 @@ Patch123: recreate-.java_pid-file-when-deleted-for-attach-mechanism.patch
Patch124: Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch Patch124: Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch
Patch125: Extend-CDS-to-support-app-class-metadata-sharing.patch Patch125: Extend-CDS-to-support-app-class-metadata-sharing.patch
Patch126: zlib-optimization.patch Patch126: zlib-optimization.patch
Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch
############################################# #############################################
# #
@ -1486,6 +1487,7 @@ pushd %{top_level_dir_name}
%patch124 -p1 %patch124 -p1
%patch125 -p1 %patch125 -p1
%patch126 -p1 %patch126 -p1
%patch127 -p1
popd popd
@ -2105,6 +2107,9 @@ require "copy_jdk_configs.lua"
%endif %endif
%changelog %changelog
* Mon Sep 21 2020 noah <hedongbo@huawei.com> -:1.8.0.265-b10.6
- add add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch
* Fri Sep 11 2020 noah <hedongbo@huawei.com> -:1.8.0.265-b10.5 * Fri Sep 11 2020 noah <hedongbo@huawei.com> -:1.8.0.265-b10.5
- add 6896810-Pin.java-fails-with-OOME-during-System.out.p.patch - add 6896810-Pin.java-fails-with-OOME-during-System.out.p.patch
- add 8231631-sun-net-ftp-FtpURLConnectionLeak.java-fails-.patch - add 8231631-sun-net-ftp-FtpURLConnectionLeak.java-fails-.patch