OSDN Git Service

Don't pass in oat file name to NativeLocationInImage
authorMathieu Chartier <mathieuc@google.com>
Thu, 18 Feb 2016 02:02:40 +0000 (18:02 -0800)
committerMathieu Chartier <mathieuc@google.com>
Fri, 19 Feb 2016 01:15:42 +0000 (17:15 -0800)
commite8bf134734ee7de8b89e6d3e3648de6548d8e627
treeee507d09fd111c062534643a631e66b1b769d359
parent6a6a75305dcc3344eb51e342e84f32fce9421522
Don't pass in oat file name to NativeLocationInImage

We already have the oat file name stored in the relocation, using
the one passed in for the image info can cause a mismatch.

I suspect this fixes a bug repated to copied methods where there
was a oat file name mismatch. When we assign the native object
relocation for the methods of a class, we use the dex cache from
that class.

However, we use method's declaring class in NativeLocationVisitor
by using ArtMethod::GetDexCache. This could result in using the
wrong ImageInfo if the declaring class is in another image.

Change-Id: I753207f7b773fac182f84ba57c640c09f9ce911f
compiler/image_writer.cc
compiler/image_writer.h