src/share/vm/prims/jvmtiImpl.cpp

changeset 7668
9cfc607cb03e
parent 6680
78bbf4d43a14
child 7994
04ff2f6cd0eb
child 9184
fbcbfd2753b5
     1.1 --- a/src/share/vm/prims/jvmtiImpl.cpp	Fri Mar 27 02:17:16 2015 +0000
     1.2 +++ b/src/share/vm/prims/jvmtiImpl.cpp	Thu Mar 26 23:17:09 2015 -0700
     1.3 @@ -25,6 +25,7 @@
     1.4  #include "precompiled.hpp"
     1.5  #include "classfile/systemDictionary.hpp"
     1.6  #include "interpreter/interpreter.hpp"
     1.7 +#include "interpreter/oopMapCache.hpp"
     1.8  #include "jvmtifiles/jvmtiEnv.hpp"
     1.9  #include "memory/resourceArea.hpp"
    1.10  #include "oops/instanceKlass.hpp"
    1.11 @@ -744,6 +745,13 @@
    1.12  }
    1.13  
    1.14  void VM_GetOrSetLocal::doit() {
    1.15 +  InterpreterOopMap oop_mask;
    1.16 +  _jvf->method()->mask_for(_jvf->bci(), &oop_mask);
    1.17 +  if (oop_mask.is_dead(_index)) {
    1.18 +    // The local can be invalid and uninitialized in the scope of current bci
    1.19 +    _result = JVMTI_ERROR_INVALID_SLOT;
    1.20 +    return;
    1.21 +  }
    1.22    if (_set) {
    1.23      // Force deoptimization of frame if compiled because it's
    1.24      // possible the compiler emitted some locals as constant values,

mercurial