Commit 1e96a5d5 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

Change-Id: I4c8e7c4f0a3a18dba8daca752a21da4822cce490
parent 821a2595
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment