View | Details | Raw Unified | Return to bug 255900
Collapse All | Expand All

(-)b/java/openjdk11/files/patch-commit-c484d890428 (+23 lines)
Added Link Here
1
commit c484d8904285652246c3af212a4211b9a8955149
2
Author: Thomas Stuefe <stuefe@openjdk.org>
3
Date:   Tue Mar 16 05:49:01 2021 +0000
4
5
    8263557: Possible NULL dereference in Arena::destruct_contents()
6
    
7
    Reviewed-by: kbarrett, coleenp
8
9
diff --git src/hotspot/share/memory/arena.cpp src/hotspot/share/memory/arena.cpp
10
index 8388f68c359..16059bed9be 100644
11
--- src/hotspot/share/memory/arena.cpp
12
+++ src/hotspot/share/memory/arena.cpp
13
@@ -310,7 +310,9 @@ void Arena::destruct_contents() {
14
   // reset size before chop to avoid a rare racing condition
15
   // that can have total arena memory exceed total chunk memory
16
   set_size_in_bytes(0);
17
-  _first->chop();
18
+  if (_first != NULL) {
19
+    _first->chop();
20
+  }
21
   reset();
22
 }
23
 

Return to bug 255900