Fix recursive initialization on app image.
Assume class B extends class A and class A's clinit tries to instantiate
class B as a field. In this case, class A is under initializing but
ClassLinker allows initialize B as class A is initialized. If class B is
initialized successfully and transaction is commited then class A abort
the transaction, status of class B will not be reverted.
Fixed by a simple approach, when compiling images, AotClassLinker does
not allow initialize a subclass when it's superclass is not fully
initialized.
A testcase produce this error is added in /c/433381
Test: make test-art-host -j64
Change-Id: Ic6bcbf1a5162d0e6ec26979b336c0f644a1c39bc
3 files changed