Commit cf24cee8 authored by Calin Juravle's avatar Calin Juravle
Browse files

Fix context verification for relative dependencies

If --classpath-dir is passed, dex2oat encodes the dependencies as relative
paths in the class loader context.

However, at runtime we always get the full apk paths. This means we will
always get a context mismatch because even if we have the same file we
encode its path differently at runtime and compile time.

Only the split apks are affected by this issue since they will depend on
the base apk which will be encoded as a relative location.

The fix is to propagate the behavior from OatFile::Setup() which resolves
the relative locations.

In fixing this I took a bit more general approach and try to infer the
context locations that should be compared based on the actual context and
the expected context.

Bug: 65385993
Test: m test-art-host-gtest
      manual with split-apks

(cherry picked from commit 1e96a5d5)

Merged-In: I414ec05da5ab4716f513d9bdb1e1b9384eeb38fa
Change-Id: Ibd36a0ed23f2a76ad6e109801fbb9e78910dbe64
parent 12e5cc89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment