26 lines
790 B
Diff
26 lines
790 B
Diff
From facc89d6a5776a26193c9321111c8489e4af525f Mon Sep 17 00:00:00 2001
|
|
Subject: 8263557: Possible NULL dereference in Arena::destruct_contents()
|
|
|
|
---
|
|
hotspot/src/share/vm/memory/allocation.cpp | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/hotspot/src/share/vm/memory/allocation.cpp b/hotspot/src/share/vm/memory/allocation.cpp
|
|
index 3cd30a686..abbcc6c49 100644
|
|
--- a/hotspot/src/share/vm/memory/allocation.cpp
|
|
+++ b/hotspot/src/share/vm/memory/allocation.cpp
|
|
@@ -521,7 +521,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.22.0
|
|
|