OSDN Git Service

Fix verification of switch offsets in large methods.
authorAndy McFadden <fadden@android.com>
Tue, 28 Sep 2010 21:43:28 +0000 (14:43 -0700)
committerAndy McFadden <fadden@android.com>
Tue, 28 Sep 2010 21:43:28 +0000 (14:43 -0700)
commitde9cdfa9d6d5fa5c46a0ec0f3f1e8de08a688841
treed647dc1768670e9cb8b97f391d23caad6c3b8e82
parentb36ea7918612c81cb42ff2021443358a9f109a6d
Fix verification of switch offsets in large methods.

The verifier was only using the low 16 bits when checking the offset
to a switch table.  This was failing on really large methods.

We also blew up the arbitrary size cap again, so I made it a warning
rather than a failure (it really wasn't doing anybody any good).

Changed to width-specific types for the various offsets and sizes.

Bug 3044850.

(cherry-pick+squash from dalvik-dev)

Change-Id: Ic7ebb86728cb39151f617a3e69e1c1994e61b5d9
vm/analysis/CodeVerify.c
vm/analysis/VerifySubs.c