From 0b48e20568646762b5cff371fe08a30cf28235fe Mon Sep 17 00:00:00 2001 From: phh Date: Thu, 9 Apr 2020 20:58:56 +0000 Subject: [PATCH] 8241444: Metaspace::_class_vsm not initialized if compressed class pointers are disabled Summary: Initialize _class_vsm to NULL by default Reviewed-by: phh Contributed-by: thomas.stuefe@gmail.com --- src/share/vm/memory/metaspace.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.cpp index 5f944d1ec..d382c3059 100644 --- a/src/share/vm/memory/metaspace.cpp +++ b/src/share/vm/memory/metaspace.cpp @@ -3390,6 +3390,8 @@ void Metaspace::initialize(Mutex* lock, MetaspaceType type) { if (using_class_space()) { // Allocate SpaceManager for classes. _class_vsm = new SpaceManager(ClassType, lock); + } else { + _class_vsm = NULL; } MutexLockerEx cl(SpaceManager::expand_lock(), Mutex::_no_safepoint_check_flag); -- GitLab