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

deps: patch V8 to 6.3.292.48 #17773

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 3
#define V8_BUILD_NUMBER 292
#define V8_PATCH_LEVEL 46
#define V8_PATCH_LEVEL 48

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
10 changes: 5 additions & 5 deletions deps/v8/src/builtins/builtins-typedarray-gen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ void TypedArrayBuiltinsAssembler::SetTypedArraySource(
// means we're safe from overflows in the following multiplication.
TNode<IntPtrT> source_byte_length = IntPtrMul(source_length, source_el_size);
CSA_ASSERT(this,
IntPtrGreaterThanOrEqual(source_byte_length, IntPtrConstant(0)));
UintPtrGreaterThanOrEqual(source_byte_length, IntPtrConstant(0)));

Label call_memmove(this), fast_c_call(this), out(this);
Branch(Word32Equal(source_el_kind, target_el_kind), &call_memmove,
Expand All @@ -821,17 +821,17 @@ void TypedArrayBuiltinsAssembler::SetTypedArraySource(

TNode<IntPtrT> target_byte_length =
IntPtrMul(target_length, target_el_size);
CSA_ASSERT(this,
IntPtrGreaterThanOrEqual(target_byte_length, IntPtrConstant(0)));
CSA_ASSERT(
this, UintPtrGreaterThanOrEqual(target_byte_length, IntPtrConstant(0)));

TNode<IntPtrT> target_data_end_ptr =
IntPtrAdd(target_data_ptr, target_byte_length);
TNode<IntPtrT> source_data_end_ptr =
IntPtrAdd(source_data_ptr, source_byte_length);

GotoIfNot(
Word32Or(IntPtrLessThanOrEqual(target_data_end_ptr, source_data_ptr),
IntPtrLessThanOrEqual(source_data_end_ptr, target_data_ptr)),
Word32Or(UintPtrLessThanOrEqual(target_data_end_ptr, source_data_ptr),
UintPtrLessThanOrEqual(source_data_end_ptr, target_data_ptr)),
call_runtime);

TNode<IntPtrT> source_length =
Expand Down
3 changes: 0 additions & 3 deletions deps/v8/src/debug/debug-coverage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,6 @@ void Coverage::SelectMode(Isolate* isolate, debug::Coverage::Mode mode) {
if (!shared->IsSubjectToDebugging()) continue;
vector->clear_invocation_count();
vectors.emplace_back(vector, isolate);
} else if (current_obj->IsJSFunction()) {
JSFunction* function = JSFunction::cast(current_obj);
function->set_code(function->shared()->code());
}
}
}
Expand Down
34 changes: 34 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-786784.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --allow-natives-syntax

function f() {
function g(arg) { return arg; }
// The closure contains a call IC slot.
return function() { return g(42); };
}

const a = Realm.create();
const b = Realm.create();

// Create two closures in different contexts sharing the same
// SharedFunctionInfo (shared due to code caching).
const x = Realm.eval(a, f.toString() + " f()");
const y = Realm.eval(b, f.toString() + " f()");

// Run the first closure to create SFI::code.
x();

// At this point, SFI::code is set and `x` has a feedback vector (`y` does not).

// Enabling block code coverage deoptimizes all functions and triggers the
// buggy code path in which we'd unconditionally replace JSFunction::code with
// its SFI::code (but skip feedback vector setup).
%DebugToggleBlockCoverage(true);

// Still no feedback vector set on `y` but it now contains code. Run it to
// trigger the crash when attempting to write into the non-existent feedback
// vector.
y();