From e8bf134734ee7de8b89e6d3e3648de6548d8e627 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 17 Feb 2016 18:02:40 -0800 Subject: 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.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/image_writer.h') diff --git a/compiler/image_writer.h b/compiler/image_writer.h index 9371d9ffa9..b227c44519 100644 --- a/compiler/image_writer.h +++ b/compiler/image_writer.h @@ -428,7 +428,7 @@ class ImageWriter FINAL { // Location of where the object will be when the image is loaded at runtime. template - T* NativeLocationInImage(T* obj, const char* oat_filename) SHARED_REQUIRES(Locks::mutator_lock_); + T* NativeLocationInImage(T* obj) SHARED_REQUIRES(Locks::mutator_lock_); // Location of where the temporary copy of the object currently is. template -- cgit v1.2.3-59-g8ed1b