JIT: fix executable flush range Flushing in executable memory should exactly mirror range in non-executable memory. Test: Manual (see bug) Bug: 132205399 Merged-In: I19d2e8e69eef07648803937fff928aa9b45ac5a2 Change-Id: I6a26e4aa236e190ce4117c0aa20f6067892d7f1c
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index 333f2da..a6aefc4 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc
@@ -1060,8 +1060,8 @@ } // Invalidate i-cache for the executable mapping. - uint8_t* x_memory = reinterpret_cast<uint8_t*>(method_header); if (cache_flush_success) { + uint8_t* x_memory = reinterpret_cast<uint8_t*>(FromCodeToAllocation(code_ptr)); cache_flush_success = FlushCpuCaches(x_memory, x_memory + total_size); }