From 09687447764a4d5d810df3d02532e4b141e7f2cd Mon Sep 17 00:00:00 2001 From: Sebastien Hertz Date: Tue, 17 Nov 2015 10:35:39 +0100 Subject: Fix StackVisitor::GetVReg for reference in shadow frame Also fixes 457-regs run-test that used to pass an incorrect vreg kind. Bug: 25428216 Change-Id: Ic31b51ca0f72350db6325f23087b06e93055d750 --- runtime/stack.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index d7edfade15..0751f64b06 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -265,7 +265,12 @@ bool StackVisitor::GetVReg(ArtMethod* m, uint16_t vreg, VRegKind kind, uint32_t* } } else { DCHECK(cur_shadow_frame_ != nullptr); - *val = cur_shadow_frame_->GetVReg(vreg); + if (kind == kReferenceVReg) { + *val = static_cast(reinterpret_cast( + cur_shadow_frame_->GetVRegReference(vreg))); + } else { + *val = cur_shadow_frame_->GetVReg(vreg); + } return true; } } -- cgit v1.2.3-59-g8ed1b