summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-05-31 12:12:50 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2024-05-31 13:01:20 +0000
commit89cd145a0ad31c3bb9151eb27f1b02af9ca140a2 (patch)
tree235206f34f16f879e23db85d9935c881cdbda1e5
parentea096e4d28d23ed289b418d24daa177e002f2672 (diff)
Fix a braino in JitCodeCache::RemoveMethodsIn.
Only update `it` only after using it. Otherwise we're using the wrong element, or using `end()`. Spotted by mingaleev@! Test: test.py Change-Id: Ieb848b8f28f6d53abde6c3058b6cd2d4b1c79a1b
-rw-r--r--runtime/jit/jit_code_cache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index e6db9817df..89be345875 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -567,9 +567,9 @@ void JitCodeCache::RemoveMethodsIn(Thread* self, const LinearAlloc& alloc) {
if (alloc.ContainsUnsafe(it->second)) {
method_headers.insert(OatQuickMethodHeader::FromCodePointer(it->first));
VLOG(jit) << "JIT removed " << it->second->PrettyMethod() << ": " << it->first;
- it = method_code_map_.erase(it);
zombie_code_.erase(it->first);
processed_zombie_code_.erase(it->first);
+ it = method_code_map_.erase(it);
} else {
++it;
}