Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiTagMap.cpp @ 14479:dcca80b5e7e7
8034867: Object references from expression stack are not visible as roots via jvmti FollowReferences and HeapDump
Summary: The heap walking is inconsistent without following references from expression stack, so need to fix it
Reviewed-by: coleenp, sspitsyn
Contributed-by: axel.siebenborn@sap.com
author | sspitsyn |
---|---|
date | Sun, 23 Feb 2014 22:36:19 -0800 |
parents | c86519f8d826 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14478:bb9356ec5967 | 14479:dcca80b5e7e7 |
---|---|
3079 bci, slot, o)) { | 3079 bci, slot, o)) { |
3080 return false; | 3080 return false; |
3081 } | 3081 } |
3082 } | 3082 } |
3083 } | 3083 } |
3084 | |
3085 StackValueCollection* exprs = jvf->expressions(); | |
3086 for (int index=0; index < exprs->size(); index++) { | |
3087 if (exprs->at(index)->type() == T_OBJECT) { | |
3088 oop o = exprs->obj_at(index)(); | |
3089 if (o == NULL) { | |
3090 continue; | |
3091 } | |
3092 | |
3093 // stack reference | |
3094 if (!CallbackInvoker::report_stack_ref_root(thread_tag, tid, depth, method, | |
3095 bci, locals->size() + index, o)) { | |
3096 return false; | |
3097 } | |
3098 } | |
3099 } | |
3100 | |
3084 } else { | 3101 } else { |
3085 blk->set_context(thread_tag, tid, depth, method); | 3102 blk->set_context(thread_tag, tid, depth, method); |
3086 if (is_top_frame) { | 3103 if (is_top_frame) { |
3087 // JNI locals for the top frame. | 3104 // JNI locals for the top frame. |
3088 java_thread->active_handles()->oops_do(blk); | 3105 java_thread->active_handles()->oops_do(blk); |