Skip to content

Commit

Permalink
deps: backport ICU-20558 to fix Intl crasher
Browse files Browse the repository at this point in the history
- 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
(Commit not landed yet in ICU)
Fixes: nodejs#27379
Co-authored-by: Refael Ackermann <refack@gmail.com>
  • Loading branch information
srl295 and refack committed Apr 25, 2019
1 parent f0df222 commit c369ef0
Show file tree
Hide file tree
Showing 3 changed files with 5,538 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parallel/test-intl.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const { execFile } = require('child_process');

// Does node think that i18n was enabled?
let enablei18n = process.config.variables.v8_enable_i18n_support;
Expand Down Expand Up @@ -125,4 +126,11 @@ if (!common.hasIntl) {
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0);
// `ffi` ligature (contraction)
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0);

// Regression test for https://github.com/nodejs/node/issues/27379
execFile(
process.execPath, ['-p', 'new Date().toLocaleString()'],
{ env: { LC_ALL: 'ja' }, encoding: 'utf-8' },
common.mustCall((e) => assert.ifError(e))
);
}
Loading

0 comments on commit c369ef0

Please sign in to comment.