Skip to content

Commit

Permalink
deps: fix segfault during gc
Browse files Browse the repository at this point in the history
This is part 2/2 of the fixes needed for v8:4871. This fix never landed
upstream because the bug is not present in active V8 version. The patch
is available from the upstream v8 bug however.

The segfault occurs at the intersection of the following three
conditions that are dependent on the allocation pattern of an
application: A pretenured (1) allocation site has to be optimized into
a merged allocation by the allocation folding optimization (2) and
there needs to be overflow of the store buffer (3).

This patch disables the allocation folding optimization for pretenured
allocations. This may have some, hopefully negligible, performance
impact on real world applications.

Fixes: #5900

PR-URL: #7303
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
ofrobots authored and Myles Borins committed Jul 12, 2016
1 parent d9e9d9f commit 1164f54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 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

0 comments on commit 1164f54

Please sign in to comment.