Revision: 23407
Author:   [email protected]
Date:     Tue Aug 26 14:35:54 2014 UTC
Log:      Fix ASAN after r23404.

[email protected]

Review URL: https://codereview.chromium.org/501403002
https://code.google.com/p/v8/source/detail?r=23407

Modified:
 /branches/bleeding_edge/src/compiler/generic-algorithm.h
 /branches/bleeding_edge/test/cctest/test-spaces.cc

=======================================
--- /branches/bleeding_edge/src/compiler/generic-algorithm.h Tue Aug 26 13:09:08 2014 UTC +++ /branches/bleeding_edge/src/compiler/generic-algorithm.h Tue Aug 26 14:35:54 2014 UTC
@@ -43,7 +43,6 @@
     typedef typename Traits::Node Node;
     typedef typename Traits::Iterator Iterator;
     typedef std::pair<Iterator, Iterator> NodeState;
-    typedef zone_allocator<NodeState> ZoneNodeStateAllocator;
     typedef std::stack<NodeState, ZoneDeque<NodeState>> NodeStateStack;
     NodeStateStack stack((ZoneDeque<NodeState>(zone)));
     BoolVector visited(Traits::max_id(graph), false, zone);
=======================================
--- /branches/bleeding_edge/test/cctest/test-spaces.cc Tue Aug 26 13:14:46 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-spaces.cc Tue Aug 26 14:35:54 2014 UTC
@@ -215,13 +215,20 @@
   CodeRange* code_range = new CodeRange(isolate);
   const size_t code_range_size = 4 * MB;
   if (!code_range->SetUp(code_range_size)) return;
-  size_t allocated_size;
-  Address result;
-  for (int i = 0; i < 5; i++) {
-    result = code_range->AllocateRawMemory(
-        code_range_size - MB, code_range_size - MB, &allocated_size);
-    CHECK((result != NULL) == (i == 0));
-  }
+  Address address;
+  size_t size;
+  address = code_range->AllocateRawMemory(code_range_size - MB,
+                                          code_range_size - MB, &size);
+  CHECK(address != NULL);
+  Address null_address;
+  size_t null_size;
+  null_address = code_range->AllocateRawMemory(
+      code_range_size - MB, code_range_size - MB, &null_size);
+  CHECK(null_address == NULL);
+  code_range->FreeRawMemory(address, size);
+  delete code_range;
+  memory_allocator->TearDown();
+  delete memory_allocator;
 }


--
--
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/d/optout.

Reply via email to