OSDN Git Service

Use 0xde as the poison value after JIT code cache reset.
authorBen Cheng <bccheng@google.com>
Mon, 17 Sep 2012 19:17:59 +0000 (12:17 -0700)
committerElliott Hughes <enh@google.com>
Mon, 17 Sep 2012 22:46:32 +0000 (15:46 -0700)
(cherry-pick of 60497bbcee68d98b2bdcb3fb64682b00d61b942d.)

Change-Id: I4f8c1bac2ac3bdc1d931e91f3e2e8038fe4c2b5a

vm/compiler/codegen/arm/ArchUtility.cpp

index 2f59193..9f87b7f 100644 (file)
@@ -429,6 +429,10 @@ void dvmCompilerCacheFlush(long start, long end, long flags)
 /* Target-specific cache clearing */
 void dvmCompilerCacheClear(char *start, size_t size)
 {
-    /* 0 is an invalid opcode for arm. */
-    memset(start, 0, size);
+    /*
+     * de is an invalid opcode for arm.
+     * From gdb disassembly:  <UNDEFINED> instruction: 0xdede
+     */
+
+    memset(start, 0xde, size);
 }