changeset 22651:d06159da32c7

8137192: [JVMCI] GetNextStackFrameTest SIGSEGV @ ScopeDesc::objects()+0x1 Summary: Handle native wrappers
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Wed, 30 Sep 2015 12:21:44 +0200
parents 939d5da65929
children d6f8d1ffcff0
files src/share/vm/jvmci/jvmciCompilerToVM.cpp
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Fri Oct 02 10:13:56 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Wed Sep 30 12:21:44 2015 +0200
@@ -943,13 +943,13 @@
           if (initialSkip > 0) {
             initialSkip --;
           } else {
-            GrowableArray<ScopeValue*>* objects = cvf->scope()->objects();
-            bool realloc_failures = false;
-            if (objects != NULL) {
-              realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), objects, THREAD);
-              Deoptimization::reassign_fields(fst.current(), fst.register_map(), objects, realloc_failures, false);
+            ScopeDesc* scope = cvf->scope();
+            // native wrapper do not have a scope
+            if (scope != NULL && scope->objects() != NULL) {
+              bool realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), scope->objects(), THREAD);
+              Deoptimization::reassign_fields(fst.current(), fst.register_map(), scope->objects(), realloc_failures, false);
 
-              GrowableArray<ScopeValue*>* local_values = cvf->scope()->locals();
+              GrowableArray<ScopeValue*>* local_values = scope->locals();
               typeArrayHandle array = oopFactory::new_boolArray(local_values->length(), thread);
               for (int i = 0; i < local_values->length(); i++) {
                 ScopeValue* value = local_values->at(i);