1 Star 0 Fork 81

zhaosai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
8263557-Possible-NULL-dereference-in-Arena-destruct_.patch 790 Bytes
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaosai-Simon/openjdk-1.8.0.git
git@gitee.com:zhaosai-Simon/openjdk-1.8.0.git
zhaosai-Simon
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助