diff options
author | Brian Carlstrom <bdc@google.com> | 2014-09-23 21:13:28 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-09-23 23:58:19 -0700 |
commit | 4f694baebb578b3ecc0c431f2a05c92efb9a50b3 (patch) | |
tree | 33c14cf4133ce5efa716721289a922dfa00f4803 /dex2oat | |
parent | f038ed9f031acb9c4fdf8a7f86e3c7ffad537e37 (diff) | |
download | art-4f694baebb578b3ecc0c431f2a05c92efb9a50b3.zip art-4f694baebb578b3ecc0c431f2a05c92efb9a50b3.tar.gz art-4f694baebb578b3ecc0c431f2a05c92efb9a50b3.tar.bz2 |
dex2oat should truncate files opened from file descriptors
Bug: 17622827
(cherry picked from commit aa93129ca54cc897fdc2c8ddd0a7136f7b5632ed)
Change-Id: I5467d488b4a57f7be35c72c16775df5bd5d69a52
Diffstat (limited to 'dex2oat')
-rw-r--r-- | dex2oat/dex2oat.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index afc01dc..9e6e958 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -1252,6 +1252,7 @@ static int dex2oat(int argc, char** argv) { } else { oat_file.reset(new File(oat_fd, oat_location)); oat_file->DisableAutoClose(); + oat_file->SetLength(0); } if (oat_file.get() == nullptr) { PLOG(ERROR) << "Failed to create oat file: " << oat_location; |