OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0a24b7
)
ART: Sync oat file to disk before patching
author
Andreas Gampe
<agampe@google.com>
Tue, 16 Sep 2014 23:40:09 +0000
(16:40 -0700)
committer
Andreas Gampe
<agampe@google.com>
Tue, 16 Sep 2014 23:40:09 +0000
(16:40 -0700)
Bug:
15567083
,
17439961
,
17510489
,
17478752
Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee
dex2oat/dex2oat.cc
patch
|
blob
|
history
diff --git
a/dex2oat/dex2oat.cc
b/dex2oat/dex2oat.cc
index
f0d3455
..
e55e358
100644
(file)
--- a/
dex2oat/dex2oat.cc
+++ b/
dex2oat/dex2oat.cc
@@
-426,6
+426,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;