Fix loading of cdex files.
If the shared data section is not explicitly provided, we must pass
nullptr to OpenCommon, which will in turn infer it from the header.
Bug: 72520014
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I3eab0f68ff379f8d407f4bb00704ea54d5ae3452
diff --git a/runtime/dex/dex_file_loader.cc b/runtime/dex/dex_file_loader.cc
index 7dde0a4..0f2758e 100644
--- a/runtime/dex/dex_file_loader.cc
+++ b/runtime/dex/dex_file_loader.cc
@@ -222,8 +222,8 @@
std::string* error_msg) const {
return OpenCommon(base,
size,
- /*data_base*/ base,
- /*data_size*/ size,
+ /*data_base*/ nullptr,
+ /*data_size*/ 0,
location,
location_checksum,
oat_dex_file,