diff --git a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp index fa572537c2f..3f3632c0eea 100644 --- a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp +++ b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp @@ -2013,7 +2013,9 @@ run: oopDesc::release_set_mark(result, ik->prototype_header()); } else { oopDesc::set_mark(result, markWord::prototype()); - oopDesc::set_klass_gap(result, 0); + if (oopDesc::has_klass_gap()) { + oopDesc::set_klass_gap(result, 0); + } oopDesc::release_set_klass(result, ik); } oop obj = cast_to_oop(result);