Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/jvmtiImpl.cpp @ 22918:9cfc607cb03e
8013942: JSR 292: assert(type() == T_OBJECT) failed: type check
Summary: A dead scope of the local needs to be identified
Reviewed-by: coleenp, vlivanov, mgronlun
author | sspitsyn |
---|---|
date | Thu, 26 Mar 2015 23:17:09 -0700 |
parents | 78bbf4d43a14 |
children | dd9cc155639c |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiImpl.cpp Fri Mar 27 02:17:16 2015 +0000 +++ b/src/share/vm/prims/jvmtiImpl.cpp Thu Mar 26 23:17:09 2015 -0700 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "classfile/systemDictionary.hpp" #include "interpreter/interpreter.hpp" +#include "interpreter/oopMapCache.hpp" #include "jvmtifiles/jvmtiEnv.hpp" #include "memory/resourceArea.hpp" #include "oops/instanceKlass.hpp" @@ -744,6 +745,13 @@ } void VM_GetOrSetLocal::doit() { + InterpreterOopMap oop_mask; + _jvf->method()->mask_for(_jvf->bci(), &oop_mask); + if (oop_mask.is_dead(_index)) { + // The local can be invalid and uninitialized in the scope of current bci + _result = JVMTI_ERROR_INVALID_SLOT; + return; + } if (_set) { // Force deoptimization of frame if compiled because it's // possible the compiler emitted some locals as constant values,