#7059·ChakraCore

[Bug]: Intl.getCanonicalLocales tests fail on Windows Server 2022 due to mismatch ICU version

Author: QuellaZhangCreated Apr 24, 2026Updated Jun 28, 2026
LabelsBug

ChakraCore Version

97e68c9174209413f621deb2f963941550ef6f22

Steps to reproduce

  • git clone https://github.com/microsoft/ChakraCore C:\gitP\microsoft\ChakraCore
  • cd /d C:\gitP\microsoft\ChakraCore
  • msbuild /m /p:Platform=x64 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.22621.0 Build\Chakra.Core.sln /t:Rebuild
  • cd /d C:\gitP\microsoft\ChakraCore\test
  • cmd.exe /c ver
  • python runtests.py -t --x64

Proof of concept

javascript
if (WScript.Platform.ICU_VERSION < 62) {
...
} else {
...
}

Exception or Error

[757/2600 0.16] Failed -> Intl\GetCanonicalLocales.js
C:\gitP\microsoft\ChakraCore\Build\VcBuild\bin\x64_Test\ch.exe -ExtendedErrorStackForTestHost -BaselineMode -WERExceptionSupport -maxInterpretCount:1 -maxSimpleJitRunCount:1 -bgjit- -dynamicprofilecache:profile.dpl.1105 -args summary -endargs C:\gitP\microsoft\ChakraCore\test\Intl\GetCanonicalLocales.js

Output:
----------------------------
ICU_VERSION = 64
de-DE-u-co-yes-kn-true
*** Running test #1 (0): Intl.getCanonicalLocales Functionality (according to ECMA 402 #sec-canonicalizelocalelist)
Test threw exception: assert.areEqual failed at (GetCanonicalLocales.js:102:17):
  expected: de-DE-u-co-kn
    actual: de-DE-u-co-yes-kn-true
   
FAILED
*** Running test #2 (1): Handling of unsupported tags and subtags (general canonicalization)
Test threw exception: assert.areEqual failed at (GetCanonicalLocales.js:139:17):
  expected: xx-ZZ-u-yy-zz
    actual: xx-ZZ-u-yy-yes-zz-yes
   
FAILED
Summary of tests: total executed: 11; passed: 9; failed: 2

Additional Context

We build Chakra using the latest MSVC to detect compiler regressions. After updating the SHA to 97e68c9174209413f621deb2f963941550ef6f22, we observed that Chakra test exhibited different behaviors on CI test VMs compared to local test VMs. The root cause was conclusively identified as differences in the Windows and ICU versions.

Environment: CI VM:

  • OS: Windows Server 2022 (10.0.20348)
  • ICU_VERSION: 64
  • Intl.getCanonicalLocales Output: "de-DE-u-co-yes-kn-true"
  • Chakra test result: 2 tests failed

Local VM:

  • OS: Windows 11 (10.0.22631)
  • ICU_VERSION: 68
  • Intl.getCanonicalLocales Output: "de-DE-u-co-kn"
  • Chakra test result: All passed