Skip to content

Commit b5d4153

Browse files
committed
deps: patch V8 to 6.3.292.48
Refs: v8/v8@6.3.292.46...6.3.292.48 PR-URL: #17773 Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 1a396bb commit b5d4153

File tree

4 files changed

+40
-9
lines changed

4 files changed

+40
-9
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 6
1212
#define V8_MINOR_VERSION 3
1313
#define V8_BUILD_NUMBER 292
14-
#define V8_PATCH_LEVEL 46
14+
#define V8_PATCH_LEVEL 48
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/builtins/builtins-typedarray-gen.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ void TypedArrayBuiltinsAssembler::SetTypedArraySource(
799799
// means we're safe from overflows in the following multiplication.
800800
TNode<IntPtrT> source_byte_length = IntPtrMul(source_length, source_el_size);
801801
CSA_ASSERT(this,
802-
IntPtrGreaterThanOrEqual(source_byte_length, IntPtrConstant(0)));
802+
UintPtrGreaterThanOrEqual(source_byte_length, IntPtrConstant(0)));
803803

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

822822
TNode<IntPtrT> target_byte_length =
823823
IntPtrMul(target_length, target_el_size);
824-
CSA_ASSERT(this,
825-
IntPtrGreaterThanOrEqual(target_byte_length, IntPtrConstant(0)));
824+
CSA_ASSERT(
825+
this, UintPtrGreaterThanOrEqual(target_byte_length, IntPtrConstant(0)));
826826

827827
TNode<IntPtrT> target_data_end_ptr =
828828
IntPtrAdd(target_data_ptr, target_byte_length);
829829
TNode<IntPtrT> source_data_end_ptr =
830830
IntPtrAdd(source_data_ptr, source_byte_length);
831831

832832
GotoIfNot(
833-
Word32Or(IntPtrLessThanOrEqual(target_data_end_ptr, source_data_ptr),
834-
IntPtrLessThanOrEqual(source_data_end_ptr, target_data_ptr)),
833+
Word32Or(UintPtrLessThanOrEqual(target_data_end_ptr, source_data_ptr),
834+
UintPtrLessThanOrEqual(source_data_end_ptr, target_data_ptr)),
835835
call_runtime);
836836

837837
TNode<IntPtrT> source_length =

deps/v8/src/debug/debug-coverage.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,6 @@ void Coverage::SelectMode(Isolate* isolate, debug::Coverage::Mode mode) {
544544
if (!shared->IsSubjectToDebugging()) continue;
545545
vector->clear_invocation_count();
546546
vectors.emplace_back(vector, isolate);
547-
} else if (current_obj->IsJSFunction()) {
548-
JSFunction* function = JSFunction::cast(current_obj);
549-
function->set_code(function->shared()->code());
550547
}
551548
}
552549
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2017 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --allow-natives-syntax
6+
7+
function f() {
8+
function g(arg) { return arg; }
9+
// The closure contains a call IC slot.
10+
return function() { return g(42); };
11+
}
12+
13+
const a = Realm.create();
14+
const b = Realm.create();
15+
16+
// Create two closures in different contexts sharing the same
17+
// SharedFunctionInfo (shared due to code caching).
18+
const x = Realm.eval(a, f.toString() + " f()");
19+
const y = Realm.eval(b, f.toString() + " f()");
20+
21+
// Run the first closure to create SFI::code.
22+
x();
23+
24+
// At this point, SFI::code is set and `x` has a feedback vector (`y` does not).
25+
26+
// Enabling block code coverage deoptimizes all functions and triggers the
27+
// buggy code path in which we'd unconditionally replace JSFunction::code with
28+
// its SFI::code (but skip feedback vector setup).
29+
%DebugToggleBlockCoverage(true);
30+
31+
// Still no feedback vector set on `y` but it now contains code. Run it to
32+
// trigger the crash when attempting to write into the non-existent feedback
33+
// vector.
34+
y();

0 commit comments

Comments
 (0)