Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault during GC #5900 (4.x) #7303

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions deps/v8/src/hydrogen-instructions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3693,6 +3693,11 @@ Representation HUnaryMathOperation::RepresentationFromInputs() {

bool HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
HValue* dominator) {
if (IsOldSpaceAllocation()) {
// Do not fold old space allocations because the store buffer might need
// to iterate old space pages during scavenges on overflow.
return false;
}
DCHECK(side_effect == kNewSpacePromotion);
Zone* zone = block()->zone();
Isolate* isolate = block()->isolate();
Expand Down Expand Up @@ -3825,12 +3830,12 @@ bool HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
}
}

bool keep_new_space_iterable = FLAG_log_gc || FLAG_heap_stats;
bool keep_heap_iterable = FLAG_log_gc || FLAG_heap_stats;
#ifdef VERIFY_HEAP
keep_new_space_iterable = keep_new_space_iterable || FLAG_verify_heap;
keep_heap_iterable = keep_heap_iterable || FLAG_verify_heap;
#endif

if (keep_new_space_iterable && dominator_allocate->IsNewSpaceAllocation()) {
if (keep_heap_iterable) {
dominator_allocate->MakePrefillWithFiller();
} else {
// TODO(hpayer): This is a short-term hack to make allocation mementos
Expand Down