diff options
| -rw-r--r-- | runtime/mem_map.cc | 7 | ||||
| -rw-r--r-- | runtime/oat_file.cc | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc index 90cc189a39..2d3581da8f 100644 --- a/runtime/mem_map.cc +++ b/runtime/mem_map.cc @@ -134,14 +134,17 @@ static uintptr_t GenerateNextMemPos() { uintptr_t MemMap::next_mem_pos_ = GenerateNextMemPos(); #endif -// Return true if the address range is contained in a single /proc/self/map entry. +// Return true if the address range is contained in a single memory map by either reading +// the maps_ variable or the /proc/self/map entry. bool MemMap::ContainedWithinExistingMap(uint8_t* ptr, size_t size, std::string* error_msg) { uintptr_t begin = reinterpret_cast<uintptr_t>(ptr); uintptr_t end = begin + size; + // There is a suspicion that BacktraceMap::Create is occasionally missing maps. TODO: Investigate + // further. { MutexLock mu(Thread::Current(), *Locks::mem_maps_lock_); - for (auto& pair : *MemMap::maps_) { + for (auto& pair : *maps_) { MemMap* const map = pair.second; if (begin >= reinterpret_cast<uintptr_t>(map->Begin()) && end <= reinterpret_cast<uintptr_t>(map->End())) { diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc index daaa195e40..6cbbce9bb1 100644 --- a/runtime/oat_file.cc +++ b/runtime/oat_file.cc @@ -127,7 +127,7 @@ OatFile* OatFile::Open(const std::string& filename, bool reserved_location = false; // Manager may be null if we are running without a runtime. if (!success && kUseDlopenOnHost && manager != nullptr) { - // ReserveOatFileLocation returns false if we are not the first caller to register that + // RegisterOatFileLocation returns false if we are not the first caller to register that // location. reserved_location = manager->RegisterOatFileLocation(location); success = reserved_location; |