Fix ASAN after r23404.
TBR=vogelheim@chromium.org Review URL: https://codereview.chromium.org/501403002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5becf4b20d
commit
102b3bdad4
@ -43,7 +43,6 @@ class GenericGraphVisit {
|
||||
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);
|
||||
|
@ -215,13 +215,20 @@ TEST(Regress3540) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user