diff options
author | Andreas Gampe <agampe@google.com> | 2014-09-16 16:40:09 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-09-17 14:46:48 -0700 |
commit | 33cb94e5e5b50330fb9fbafe90d1a2a6bd026e2f (patch) | |
tree | 0b02b157d163b51e60f9a3e85b6d96b6ee27fa3a | |
parent | a20b7b3ecf90bb761d7085403782721f2fb474c5 (diff) | |
download | art-33cb94e5e5b50330fb9fbafe90d1a2a6bd026e2f.zip art-33cb94e5e5b50330fb9fbafe90d1a2a6bd026e2f.tar.gz art-33cb94e5e5b50330fb9fbafe90d1a2a6bd026e2f.tar.bz2 |
ART: Sync oat file to disk before patching
Bug: 15567083, 17439961, 17510489, 17478752
(cherry picked from commit 035592c51fee2995a3d90a9043f91a7a3128df2b)
Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee
-rw-r--r-- | dex2oat/dex2oat.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index be6f097..d97144e 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -435,6 +435,11 @@ class Dex2Oat { return nullptr; } + // Flush result to disk. Patching code will re-open the file (mmap), so ensure that our view + // of the file already made it there and won't be re-ordered with writes from PatchOat or + // image patching. + oat_file->Flush(); + if (!driver->IsImage() && driver->GetCompilerOptions().GetIncludePatchInformation()) { t2.NewTiming("Patching ELF"); std::string error_msg; |