summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.cc
diff options
context:
space:
mode:
authornikolay serdjuk <nikolay.y.serdjuk@intel.com>2014-04-07 13:54:24 +0700
committernikolay serdjuk <nikolay.y.serdjuk@intel.com>2014-04-07 13:54:24 +0700
commit1d66e88ea74f7d85f75db7f145fe955d5f0f6872 (patch)
tree715cee13931192549a592a7dac91235c0a1d77c0 /runtime/debugger.cc
parentb70b09f6cc1f1fbbf604da7b6b1ea5f74e43571c (diff)
downloadart-1d66e88ea74f7d85f75db7f145fe955d5f0f6872.zip
art-1d66e88ea74f7d85f75db7f145fe955d5f0f6872.tar.gz
art-1d66e88ea74f7d85f75db7f145fe955d5f0f6872.tar.bz2
JDWP request is parsed incorrectly due to junk in the descriptor
The ClassHelper object is created and deleted on the same line. Therefore it is wrong to refer to any class members of the object in the next line. Any references to the object and the object itself must have the same live ranges. Change-Id: I792d7baa3828b0389254f2941705e006cab092cd Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r--runtime/debugger.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 2872a02..514ad4c 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -1217,7 +1217,8 @@ JDWP::JdwpError Dbg::SetArrayElements(JDWP::ObjectId array_id, int offset, int c
LOG(WARNING) << __FUNCTION__ << " access out of bounds: offset=" << offset << "; count=" << count;
return JDWP::ERR_INVALID_LENGTH;
}
- const char* descriptor = ClassHelper(dst->GetClass()).GetDescriptor();
+ ClassHelper ch(dst->GetClass());
+ const char* descriptor = ch.GetDescriptor();
JDWP::JdwpTag tag = BasicTagFromDescriptor(descriptor + 1);
if (IsPrimitiveTag(tag)) {