Skip to content

Commit e922a22

Browse files
srl295targos
authored andcommitted
deps: backport ICU-20558 to fix Intl crasher
- Floating patch for ICU 63.x and 64.x - fixing crash in Intl when ICU data not found. - Regression test from refack included. Background: - ICU-13778 (landed in ICU 63.1) fixed a bug but added a regression. - a recent v8 land in Node v12 (which one?) exposes this bug to cause a crash when ICU data is not found. ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558 Backport of: unicode-org/icu#632 Fixes: #27379 Co-authored-by: Refael Ackermann <[email protected]> PR-URL: #27415 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent 3614a00 commit e922a22

File tree

3 files changed

+5541
-0
lines changed

3 files changed

+5541
-0
lines changed

test/parallel/test-intl.js

+11
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323
const common = require('../common');
2424
const assert = require('assert');
25+
const { execFile } = require('child_process');
2526

2627
// Does node think that i18n was enabled?
2728
let enablei18n = process.config.variables.v8_enable_i18n_support;
@@ -125,4 +126,14 @@ if (!common.hasIntl) {
125126
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0);
126127
// `ffi` ligature (contraction)
127128
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0);
129+
130+
{
131+
// Regression test for https://github.com/nodejs/node/issues/27379
132+
const env = { ...process.env, LC_ALL: 'ja' };
133+
execFile(
134+
process.execPath, ['-p', 'new Date().toLocaleString()'],
135+
{ env },
136+
common.mustCall((e) => assert.ifError(e))
137+
);
138+
}
128139
}

0 commit comments

Comments
 (0)