From b24b4a7e0c4f9bbea49f9dd95b2600080c8293d9 Mon Sep 17 00:00:00 2001 From: Jeff Hao Date: Wed, 31 Jul 2013 13:47:31 -0700 Subject: Make verifier allow integral types to be put in integral type arrays. This fixes a problem where the verifier was rejecting when an integer is put into a byte array. This also more closely matches the RI. Also fixes various issues with debugging checks caught by cts. Bug 10097083 Change-Id: Ie816fcdd85d6dc898feffa1e3fea8cfc2c6946ff --- runtime/stack.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index aeb15f0..a74bcdb 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -266,7 +266,11 @@ void StackVisitor::SanityCheckFrame() const { // Frame sanity. size_t frame_size = method->GetFrameSizeInBytes(); CHECK_NE(frame_size, 0u); - CHECK_LT(frame_size, 1024u); + // A rough guess at an upper size we expect to see for a frame. The 256 is + // a dex register limit. The 16 incorporates callee save spills and + // outgoing argument set up. + const size_t kMaxExpectedFrameSize = 256 * sizeof(word) + 16; + CHECK_LE(frame_size, kMaxExpectedFrameSize); size_t return_pc_offset = method->GetReturnPcOffsetInBytes(); CHECK_LT(return_pc_offset, frame_size); } -- cgit v1.1