Skip to content
This repository was archived by the owner on Oct 16, 2021. It is now read-only.

Commit fa9a80f

Browse files
committed
deps: port 1164f54 to deps/v8z
Original commit message: 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: nodejs/node#5900 PR-URL: nodejs/node#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>
1 parent 7f5e09f commit fa9a80f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

deps/v8z/src/hydrogen-instructions.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,6 +3695,11 @@ Representation HUnaryMathOperation::RepresentationFromInputs() {
36953695

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

0 commit comments

Comments
 (0)