Android 9.0.0 release 20
Add check to CheckImageIdenticalToOriginalExceptForRelocation

Add defensive check which fails gracefully if the
relocation offset is larger than the image size.

Add tests.

(cherry picked from commit b16e4a3c7563f83df0d6fd10c0aa4f1d36be8079)

Fix patchoat_test for heap poisoning

The test was disabled for heap poisoning; keep it disabled.

The TEST_DISABLED_FOR_HEAP_POISONING macro is in fact just
a conditional return, and I didn't account for it properly.

(cherry picked from commit 23ae5322a4e53d0fbe3ea514ec1a6941de472067)

Bug: 109677607
Test: test-art-host-gtest-patchoat_test SANITIZE_HOST=address
Test: test-art-host-gtest-patchoat_test ART_HEAP_POISONING=true

Merged-In: Ic989d5b7c77fd66e77b9e8ba90df1bf490a46e43
Merged-In: I40266d0a06102e4d8bc52357b884b0e7d9fd2630
Change-Id: If2c83bee3c19eb9d53154d35fcaf0b3edf152872
2 files changed