diff options
| author | 2018-01-08 17:09:48 -0800 | |
|---|---|---|
| committer | 2018-01-09 09:26:09 -0800 | |
| commit | 21cf2581844c478db3627d3e0259c205bce76ae7 (patch) | |
| tree | f74e21fe818dfe4fe40db8b774751b1a8aeaf628 /dexlayout/dexlayout.cc | |
| parent | 680e88ba30d1c599c5eaab4a207db3e39bf2d57f (diff) | |
Convert to StandardDex in fixup_dex_dex_file
In fixup_dex_file, run dexlayout to convert compact dex back to
standard dex since the output is supposed to be standard dex.
Fixed a bug in dexlayout where conversion from compact dex ->
standard dex was not supported becuase the dex header was always
preserved.
Test: test/testrunner/testrunner.py --host ---redefine-stress --compact-dex-level fast
Bug: 63756964
Change-Id: Id13e8593458213e7040d053c35e8914404ae5381
Diffstat (limited to 'dexlayout/dexlayout.cc')
| -rw-r--r-- | dexlayout/dexlayout.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dexlayout/dexlayout.cc b/dexlayout/dexlayout.cc index 47a3e943a5..000d1356b9 100644 --- a/dexlayout/dexlayout.cc +++ b/dexlayout/dexlayout.cc @@ -1912,7 +1912,8 @@ void DexLayout::ProcessDexFile(const char* file_name, if (do_layout) { LayoutOutputFile(dex_file); } - OutputDexFile(dex_file, do_layout); + // If we didn't set the offsets eagerly, we definitely need to compute them here. + OutputDexFile(dex_file, do_layout || !eagerly_assign_offsets); // Clear header before verifying to reduce peak RAM usage. const size_t file_size = header_->FileSize(); |