Fix SEGMAP_ERR by rolling ICU?

Fix Intl.ListFormat long strings cause SEGMAP_ERR
Add slow regression test.

Bug: chromium:1044570
Change-Id: I20e3523832ac3c69e88c11bd530122bbe782ad01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2032712
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66140}
This commit is contained in:
Frank Tang 2020-02-04 15:48:34 -08:00 committed by Commit Bot
parent 15d9575a16
commit 44380f804d
2 changed files with 14 additions and 0 deletions

View File

@ -39,6 +39,9 @@
# http://crbug/v8/9930
'date-format/format_range_hour_cycle': [FAIL],
# Slow tests.
'regress-1044570': [PASS, SLOW, NO_VARIANTS],
}], # ALWAYS
['variant == no_wasm_traps', {

View File

@ -0,0 +1,11 @@
// Copyright 2020 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.
// Test no crash with array of very long string.
const num = 0xAFFFFFF;
const lfm = new Intl.ListFormat();
const s = 'a'.repeat(num);
// Ensure the following won't crash. The length will be 0
// because it will be too long to return correct result.
assertEquals(0, lfm.format(Array(16).fill(s)).length);