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
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]>
  • Loading branch information
srl295 authored and MylesBorins committed May 16, 2019
1 parent 0fd4b35 commit c7931e4
Show file tree
Hide file tree
Showing 3 changed files with 5,541 additions and 0 deletions.
11 changes: 11 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,14 @@ 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
const env = { ...process.env, LC_ALL: 'ja' };
execFile(
process.execPath, ['-p', 'new Date().toLocaleString()'],
{ env },
common.mustCall((e) => assert.ifError(e))
);
}
}
Loading

0 comments on commit c7931e4

Please sign in to comment.