diff options
author | Jeff Hao <jeffhao@google.com> | 2013-07-31 13:47:31 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2013-08-01 13:47:26 -0700 |
commit | b24b4a7e0c4f9bbea49f9dd95b2600080c8293d9 (patch) | |
tree | a59863dc34ae5262a418d855fe3f55eeb452b9bd /runtime/stack.cc | |
parent | 8d4fb0eb94ea3dd5db9461230e2c11926e4ebdb4 (diff) | |
download | art-b24b4a7e0c4f9bbea49f9dd95b2600080c8293d9.zip art-b24b4a7e0c4f9bbea49f9dd95b2600080c8293d9.tar.gz art-b24b4a7e0c4f9bbea49f9dd95b2600080c8293d9.tar.bz2 |
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
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r-- | runtime/stack.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |