summaryrefslogtreecommitdiff
path: root/oatdump/oatdump_app_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-02-22 10:11:21 +0000
committer Vladimir Marko <vmarko@google.com> 2019-02-22 10:21:32 +0000
commit9a8dcea0e97e610c5b8589e0093dbb7766a08694 (patch)
tree1abbd3a5846560991950e0ad1470b47834f274dd /oatdump/oatdump_app_test.cc
parent438cc2b34be2a5d114a50ba6cdef22f9045d863a (diff)
Fix oatdump .data.bimg.rel.ro for intrinsics.
The Integer.valueOf() intrinsic is using entries that point to the boot image live objects array data rather than a start of an Object. So, we need to check for such entries before we look at the type of the Object. Test: Additional test in oatdump_app_test Test: m test-art-host-gtest Bug: 71526895 Change-Id: I49ab3b416aa2b4912b9fd2043805e900ad76f0f2
Diffstat (limited to 'oatdump/oatdump_app_test.cc')
-rw-r--r--oatdump/oatdump_app_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/oatdump/oatdump_app_test.cc b/oatdump/oatdump_app_test.cc
index 2b04a0d295..83e5f51d41 100644
--- a/oatdump/oatdump_app_test.cc
+++ b/oatdump/oatdump_app_test.cc
@@ -28,4 +28,16 @@ TEST_F(OatDumpTest, TestAppWithBootImageStatic) {
ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode));
}
+TEST_F(OatDumpTest, TestAppImageWithBootImage) {
+ const std::string app_image_arg = "--app-image-file=" + GetAppImageName();
+ ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M", app_image_arg}));
+ ASSERT_TRUE(Exec(kDynamic, kModeAppImage, {}, kListAndCode));
+}
+TEST_F(OatDumpTest, TestAppImageWithBootImageStatic) {
+ TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
+ const std::string app_image_arg = "--app-image-file=" + GetAppImageName();
+ ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M", app_image_arg}));
+ ASSERT_TRUE(Exec(kStatic, kModeAppImage, {}, kListAndCode));
+}
+
} // namespace art