OSDN Git Service

Ensure void type is resolved when running without image
authorSebastien Hertz <shertz@google.com>
Tue, 9 Dec 2014 18:08:15 +0000 (19:08 +0100)
committerSebastien Hertz <shertz@google.com>
Wed, 10 Dec 2014 18:56:56 +0000 (19:56 +0100)
commit3138584a720b86f2f542160425d3a922920760c0
treea7135e1b8fe7e7a2ac1ead3560a3bd036d7d37b0
parent776b880f66edb21cb3b4225877e494ec7a9ec1a2
Ensure void type is resolved when running without image

To initialize java.lang.Void correctly, we need to ensure the 'void'
class is initialized in the dex cache of core-libart (because Java
code relies on it). However, if we run without image, the dex cache
may not contain the void class before we initialize java.lang.Void
class.

This CL fixes this by forcing the resolution of 'void' class when
initializing the runtime without image.

We also generalize that to other types by not skipping verification
when running with preopted oat files without image. By verifying
all classes, we ensure all resolved types are in the dex caches.

Bug: 18338511
(cherry picked from commit cad417c72cc879ae8b6a8b2fff26f05a770f2051)

Change-Id: I65e345da47be6eda1ee55897c01a9a4cc1444915
runtime/class_linker.cc