Skip to content

Commit af63871

Browse files
fhinkelofrobots
authored andcommittedAug 3, 2016
deps: cherry-pick a51f429 from V8 upstream
Original commit message: [regexp] Fix case-insensitive matching for one-byte subjects. The bug occurs because we do not canonicalize character class ranges before adding case equivalents. While adding case equivalents, we abort early for one-byte subject strings, assuming that the ranges are sorted. Which they are not. [email protected] BUG=v8:5199 Review-Url: https://codereview.chromium.org/2159683002 Cr-Commit-Position: refs/heads/master@{#37833} Fixes: #7708 PR-URL: #7834 Ref: #7833 Reviewed-By: targos - Michaël Zasso <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: jasnell - James M Snell <[email protected]> Reviewed-By: ofrobots - Ali Ijaz Sheikh <[email protected]>
1 parent 980f4da commit af63871

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
 

‎deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 0
1313
#define V8_BUILD_NUMBER 71
14-
#define V8_PATCH_LEVEL 58
14+
#define V8_PATCH_LEVEL 59
1515

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

‎deps/v8/src/regexp/jsregexp.cc

+1
Original file line numberDiff line numberDiff line change
@@ -5877,6 +5877,7 @@ Vector<const int> CharacterRange::GetWordBounds() {
58775877
void CharacterRange::AddCaseEquivalents(Isolate* isolate, Zone* zone,
58785878
ZoneList<CharacterRange>* ranges,
58795879
bool is_one_byte) {
5880+
CharacterRange::Canonicalize(ranges);
58805881
int range_count = ranges->length();
58815882
for (int i = 0; i < range_count; i++) {
58825883
CharacterRange range = ranges->at(i);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2016 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+
assertTrue(/(a[\u1000A])+/i.test('aa'));

0 commit comments

Comments
 (0)
Please sign in to comment.