Snap for 5698755 from 83a42fd1e4ce5d6b1f765b3993b565afe75176d4 to qt-c2f2-release

Change-Id: If8950174fd3c5af15984214add4fcd450b22c4cc
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);
     }