diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dex_file.cc | 2 | ||||
| -rw-r--r-- | src/mem_map.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dex_file.cc b/src/dex_file.cc index 3ba671e23e..cca1a30f32 100644 --- a/src/dex_file.cc +++ b/src/dex_file.cc @@ -96,7 +96,7 @@ const DexFile* DexFile::Open(const std::string& filename, } void DexFile::ChangePermissions(int prot) const { - mem_map_->Protect(prot); + CHECK(mem_map_->Protect(prot)) << GetLocation(); } const DexFile* DexFile::OpenFile(const std::string& filename, diff --git a/src/mem_map.cc b/src/mem_map.cc index 8201fa8fbe..d3ebd4a60d 100644 --- a/src/mem_map.cc +++ b/src/mem_map.cc @@ -233,7 +233,8 @@ bool MemMap::Protect(int prot) { return true; } - PLOG(ERROR) << "mprotect(" << base_begin_ << ", " << base_size_ << ", " << prot << ") failed"; + PLOG(ERROR) << "mprotect(" << reinterpret_cast<void*>(base_begin_) << ", " << base_size_ << ", " + << prot << ") failed"; return false; } |