Fix length of descriptor field when reading debug info.
TypeIndex is a 16-bit value, and storing kDexNoIndex (0xFFFFFFFF) caused
a failure in a dcheck on the bounds of the value.
Bug: 37287051
Test: mm -j31 test-art-host-gtest-dex_file_test
Change-Id: I8344ea126b044563b9a25e1303b7e3e7124ef86f
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index 625794e..eaf144b 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -1044,7 +1044,7 @@
}
uint32_t name_idx = DecodeUnsignedLeb128P1(&stream);
- uint32_t descriptor_idx = DecodeUnsignedLeb128P1(&stream);
+ uint16_t descriptor_idx = DecodeUnsignedLeb128P1(&stream);
uint32_t signature_idx = kDexNoIndex;
if (opcode == DBG_START_LOCAL_EXTENDED) {
signature_idx = DecodeUnsignedLeb128P1(&stream);