OSDN Git Service

Fix dexlayout calculation of code item size.
authorJeff Hao <jeffhao@google.com>
Mon, 6 Mar 2017 23:05:38 +0000 (15:05 -0800)
committerJeff Hao <jeffhao@google.com>
Tue, 7 Mar 2017 00:24:05 +0000 (16:24 -0800)
commita64a64cfae5c6dd7c2bdb039a92e9313dfd1e315
tree173b22c4293d00b1f50dcbf19edb991fedd6be70
parentef81e988d0eb4db390e576aac346701b2d820916
Fix dexlayout calculation of code item size.

Calculation of code item size was based on looking for the latest catch
handler referenced by a try block, but there can be handlers that aren't
referenced by any try blocks. This fix manually reads all handlers to
ensure the end is actually reached.

Bug: 35978524
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: I33b30087845f806cd34b888f1ec457ee692f2af4
dexlayout/dex_ir.cc
dexlayout/dexlayout_test.cc