summaryrefslogtreecommitdiffstats
path: root/dx/src/com/android/dx/dex/code/HighRegisterPrefix.java
diff options
context:
space:
mode:
authorJesse Wilson <jwilson@squareup.com>2012-09-01 00:37:56 -0400
committerJesse Wilson <jwilson@squareup.com>2012-09-01 00:44:26 -0400
commitd43341a24abe339d474b0b0d92669917ae2eb9bf (patch)
treed8fe1a3e49c77a7c505221a7edf9481e3efffd27 /dx/src/com/android/dx/dex/code/HighRegisterPrefix.java
parent3e46814d8984243612176c9b15d8d012dcca2143 (diff)
downloadandroid_dalvik-d43341a24abe339d474b0b0d92669917ae2eb9bf.tar.gz
android_dalvik-d43341a24abe339d474b0b0d92669917ae2eb9bf.tar.bz2
android_dalvik-d43341a24abe339d474b0b0d92669917ae2eb9bf.zip
Fix an ugly bug where try/catch offsets weren't being mapped properly.
In dex files, there are several places where one object refers to another object by its position in the file. The dex merger is generally very careful to adjust these mappings when combining dex files. Unfortunately one of these cases was broken. Each try_item refers to a corresponding encoded_catch_handler by its byte offset in a list. Most of the time this byte offset is the same in the input dex file and the output dex file. But encoded_catch_handlers are variable-length because they use a variable-length uleb128 encoding to address the type_idx being caught. When dex files are merged, some exception types may go from having a small index to having a large index, increasing the number of bytes required to encode that index. This breaks our ability to directly copy over offsets as we were doing previously. Bug: http://code.google.com/p/android/issues/detail?id=36490 Change-Id: I3bdadf20899fdb5d4d074e69103b33c0404a31f8
Diffstat (limited to 'dx/src/com/android/dx/dex/code/HighRegisterPrefix.java')
0 files changed, 0 insertions, 0 deletions