OSDN Git Service

Hold dex caches live in class table
authorMathieu Chartier <mathieuc@google.com>
Thu, 2 Jun 2016 18:48:30 +0000 (11:48 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 3 Jun 2016 01:03:41 +0000 (18:03 -0700)
commitf284d448e3edd428b6ade473d0993028638b2064
treee24f57f952f4e6c850ec910de3361aef6340727a
parent3f432d5a7c184b7580bd5aba27158c1455c328ff
Hold dex caches live in class table

Prevents temporary dex caches being unloaded for the same dex file.
Usually this is OK, but if someone resolved a string in that dex
cache, it could leave stale pointers in BSS. Also it can use extra
memory in linear alloc if we allocate dex cache arrays multiple
times.

Bug: 29083330
Change-Id: Ia44668f013ceef1f5eb80f653a48d0f8004548c9
12 files changed:
compiler/driver/compiler_driver-inl.h
compiler/driver/compiler_driver.cc
compiler/oat_test.cc
dex2oat/dex2oat.cc
oatdump/oatdump.cc
runtime/class_linker.cc
runtime/class_linker.h
runtime/class_table-inl.h
runtime/class_table.cc
runtime/class_table.h
runtime/native/dalvik_system_DexFile.cc
runtime/native/dalvik_system_VMRuntime.cc