OSDN Git Service

ART: Change RETURN_OBJECT verification for arrays
authorAndreas Gampe <agampe@google.com>
Mon, 23 Mar 2015 17:10:20 +0000 (10:10 -0700)
committerAndreas Gampe <agampe@google.com>
Thu, 26 Mar 2015 22:03:46 +0000 (15:03 -0700)
commit16f149c2cb43a14d8f33d7d0fa36cd784e900f07
tree299d484c007d373c68e22008ddedfacbd0c044f2
parentcac51526bbd03947676a8d49700425b19a57e447
ART: Change RETURN_OBJECT verification for arrays

Arrays appear to be valid (as according to spec), even if their
components are erroneous. If a component is erroneous, it may not
have loaded superclass or interface information, and so fail a
direct check for assignability.

Add a cutout that checks whether the declared return-type or the
actual return-type are arrays with erroneous components (and if so,
have the same 'depth'). In that case, generate a soft instead of a
hard error.

Also includes a fix to DumpClass.

Bug: 19683465
Change-Id: Ie73de03adeb0af7e939370d7363684fe125d7994
runtime/mirror/class.cc
runtime/verifier/method_verifier.cc
runtime/verifier/reg_type.cc
runtime/verifier/reg_type.h