Reviewers: Yang,

Description:
Make LeakSanitizer happy, part 2. Fixed register usage on the way.

Note that according to the System V ABI for AMD64, rbx must be
preserved across calls. We actually crash with clang in the x64
assembler tests without that fix, we were lucky with GCC.

Please review this at https://codereview.chromium.org/144313017/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+8, -6 lines):
  M test/cctest/test-assembler-x64.cc
  M test/cctest/test-global-handles.cc
  M test/cctest/test-heap.cc


Index: test/cctest/test-assembler-x64.cc
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc index 7d17a3373eca686fd1c3f1e88196f563a52a0c0b..23c7465b21d5b75914df468a5f18817532dfc197 100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -179,10 +179,10 @@ TEST(AssemblerX64XchglOperations) {
Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));

   __ movq(rax, Operand(arg1, 0));
-  __ movq(rbx, Operand(arg2, 0));
-  __ xchgl(rax, rbx);
+  __ movq(rdx, Operand(arg2, 0));
+  __ xchgl(rax, rdx);
   __ movq(Operand(arg1, 0), rax);
-  __ movq(Operand(arg2, 0), rbx);
+  __ movq(Operand(arg2, 0), rdx);
   __ ret(0);

   CodeDesc desc;
@@ -279,8 +279,8 @@ TEST(AssemblerX64TestlOperations) {
   // Set rax with the ZF flag of the testl instruction.
   Label done;
   __ movq(rax, Immediate(1));
-  __ movq(rbx, Operand(arg2, 0));
-  __ testl(Operand(arg1, 0), rbx);
+  __ movq(rdx, Operand(arg2, 0));
+  __ testl(Operand(arg1, 0), rdx);
   __ j(zero, &done, Label::kNear);
   __ movq(rax, Immediate(0));
   __ bind(&done);
Index: test/cctest/test-global-handles.cc
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc index 2261a5a14cf80d3de807f2131fb7a14e0109e989..48b6655bbcd5376cf43f15e415a0ffe9c82be2c3 100644
--- a/test/cctest/test-global-handles.cc
+++ b/test/cctest/test-global-handles.cc
@@ -316,6 +316,8 @@ TEST(ImplicitReferences) {
          reinterpret_cast<HeapObject**>(g2s1.location()));
   ASSERT(implicit_refs->at(1)->length == 1);
   ASSERT(implicit_refs->at(1)->children[0] == g2c1.location());
+  global_handles->RemoveObjectGroups();
+  global_handles->RemoveImplicitRefGroups();
 }


Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 1bb89eb8b63b4a4e93d61f1461410c7a425602d5..3e8d93b3ada6b0aca7121626b54d7a7d81638fd7 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3483,7 +3483,7 @@ TEST(DeferredHandles) {
   DeferredHandleScope deferred(isolate);
   DummyVisitor visitor;
   isolate->handle_scope_implementer()->Iterate(&visitor);
-  deferred.Detach();
+  delete deferred.Detach();
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to