This commit is contained in:
slava86 2021-08-21 00:09:00 +03:00
parent 9e15813a9b
commit 7d90702f0c
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,29 @@
From c484d8904285652246c3af212a4211b9a8955149 Mon Sep 17 00:00:00 2001
From: Thomas Stuefe <stuefe@openjdk.org>
Date: Tue, 16 Mar 2021 05:49:01 +0000
Subject: [PATCH] 8263557: Possible NULL dereference in
Arena::destruct_contents()
Reviewed-by: kbarrett, coleenp
---
src/hotspot/share/memory/arena.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/memory/arena.cpp b/src/hotspot/share/memory/arena.cpp
index 8388f68c359..16059bed9be 100644
--- a/src/hotspot/share/memory/arena.cpp
+++ b/src/hotspot/share/memory/arena.cpp
@@ -310,7 +310,9 @@ void Arena::destruct_contents() {
// reset size before chop to avoid a rare racing condition
// that can have total arena memory exceed total chunk memory
set_size_in_bytes(0);
- _first->chop();
+ if (_first != NULL) {
+ _first->chop();
+ }
reset();
}
--
2.31.1

View file

@ -245,7 +245,7 @@
%global top_level_dir_name %{origin} %global top_level_dir_name %{origin}
%global minorver 0 %global minorver 0
%global buildver 6 %global buildver 6
%global rpmrelease 0 %global rpmrelease 1
#%%global tagsuffix "" #%%global tagsuffix ""
# priority must be 8 digits in total; untill openjdk 1.8 we were using 18..... so when moving to 11 we had to add another digit # priority must be 8 digits in total; untill openjdk 1.8 we were using 18..... so when moving to 11 we had to add another digit
%if %is_system_jdk %if %is_system_jdk
@ -1182,6 +1182,7 @@ Patch8: s390-8214206_fix.patch
# JDK-8247874: Replacement in VersionProps.java.template not working when --with-vendor-bug-url contains '&' # JDK-8247874: Replacement in VersionProps.java.template not working when --with-vendor-bug-url contains '&'
Patch9: jdk8247874-fix_ampersand_in_vm_bug_url.patch Patch9: jdk8247874-fix_ampersand_in_vm_bug_url.patch
Patch10: clang_stack.patch Patch10: clang_stack.patch
Patch11: 0001-8263557-Possible-NULL-dereference-in-Arena-destruct_.patch
############################################# #############################################
# #
# JDK 9+ only patches # JDK 9+ only patches
@ -1460,6 +1461,7 @@ pushd %{top_level_dir_name}
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1
popd # openjdk popd # openjdk
%patch1000 %patch1000