Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: src/heap/heap-inl.h

Issue 1200833003: Fix wrong DCHECK in Heap::FindAllocationMemento where bump pointer overflow points to the currently… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // object of at least word size (the header map word) following it, so 445 // object of at least word size (the header map word) following it, so
446 // suffices to compare ptr and top here. Note that technically we do not have 446 // suffices to compare ptr and top here. Note that technically we do not have
447 // to compare with the current top pointer of the from space page during GC, 447 // to compare with the current top pointer of the from space page during GC,
448 // since we always install filler objects above the top pointer of a from 448 // since we always install filler objects above the top pointer of a from
449 // space page when performing a garbage collection. However, always performing 449 // space page when performing a garbage collection. However, always performing
450 // the test makes it possible to have a single, unified version of 450 // the test makes it possible to have a single, unified version of
451 // FindAllocationMemento that is used both by the GC and the mutator. 451 // FindAllocationMemento that is used both by the GC and the mutator.
452 Address top = NewSpaceTop(); 452 Address top = NewSpaceTop();
453 DCHECK(memento_address == top || 453 DCHECK(memento_address == top ||
454 memento_address + HeapObject::kHeaderSize <= top || 454 memento_address + HeapObject::kHeaderSize <= top ||
455 !NewSpacePage::OnSamePage(memento_address, top)); 455 !NewSpacePage::OnSamePage(memento_address, top - 1));
456 if (memento_address == top) return NULL; 456 if (memento_address == top) return NULL;
457 457
458 AllocationMemento* memento = AllocationMemento::cast(candidate); 458 AllocationMemento* memento = AllocationMemento::cast(candidate);
459 if (!memento->IsValid()) return NULL; 459 if (!memento->IsValid()) return NULL;
460 return memento; 460 return memento;
461 } 461 }
462 462
463 463
464 void Heap::UpdateAllocationSiteFeedback(HeapObject* object, 464 void Heap::UpdateAllocationSiteFeedback(HeapObject* object,
465 ScratchpadSlotMode mode) { 465 ScratchpadSlotMode mode) {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 682
683 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 683 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
684 for (Object** current = start; current < end; current++) { 684 for (Object** current = start; current < end; current++) {
685 CHECK((*current)->IsSmi()); 685 CHECK((*current)->IsSmi());
686 } 686 }
687 } 687 }
688 } 688 }
689 } // namespace v8::internal 689 } // namespace v8::internal
690 690
691 #endif // V8_HEAP_HEAP_INL_H_ 691 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698