Skip to content

Commit 1164f54

Browse files
ofrobotsMyles Borins
authored and
Myles Borins
committed
deps: fix segfault during gc
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent d9e9d9f commit 1164f54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deps/v8/src/hydrogen-instructions.cc

+5
Original file line numberDiff line numberDiff line change
@@ -3693,6 +3693,11 @@ Representation HUnaryMathOperation::RepresentationFromInputs() {
36933693

36943694
bool HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
36953695
HValue* dominator) {
3696+
if (IsOldSpaceAllocation()) {
3697+
// Do not fold old space allocations because the store buffer might need
3698+
// to iterate old space pages during scavenges on overflow.
3699+
return false;
3700+
}
36963701
DCHECK(side_effect == kNewSpacePromotion);
36973702
Zone* zone = block()->zone();
36983703
Isolate* isolate = block()->isolate();

0 commit comments

Comments
 (0)