OSDN Git Service

Fix heap poisoning
authorMathieu Chartier <mathieuc@google.com>
Fri, 12 Aug 2016 22:44:44 +0000 (15:44 -0700)
committerMathieu Chartier <mathieuc@google.com>
Fri, 12 Aug 2016 22:44:44 +0000 (15:44 -0700)
Was wrong register.

Test: test-art-host-run-test CC table lookup + poisoning.

Bug: 30162165
Change-Id: If347a40963bcc2fb9e21c54b5405c852bcd3af08

runtime/arch/x86_64/quick_entrypoints_x86_64.S

index 8a4a334..32768b0 100644 (file)
@@ -1098,7 +1098,7 @@ MACRO1(ALLOC_ARRAY_TLAB_FAST_PATH_RESOLVED, slowPathLabel)
                                                                // Store the class pointer in the
                                                                // header.
                                                                // No fence needed for x86.
-    POISON_HEAP_REF ecx
+    POISON_HEAP_REF r8d
     movl %r8d, MIRROR_OBJECT_CLASS_OFFSET(%rax)
     movl %esi, MIRROR_ARRAY_LENGTH_OFFSET(%rax)
     ret                                                        // Fast path succeeded.