chakra-core / chakra-core/ChakraCore

assertion failure in Js::IntlEngineInterfaceExtensionObject::EntryIntl_LocaleCompare

Open
#6,238 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

the following code can trigger an assertion failure in Js::IntlEngineInterfaceExtensionObject::EntryIntl_LocaleCompare
````
function opt(arr, s) {
arr[0] = 1.1;

if (s !== null) {
let tmp = 'a'.localeCompare(s);
}

arr[0] = 2.3023e-320;
}

function main() {
let arr = [1.1];

for (let i = 0; i < 100; i++) {
'a'.localeCompare('x', []);

opt(arr, null);

try {
{
main(main, {toString: () => {
throw 1;
}});
}
} catch (e) {

}
}

opt(arr, {toString: () => {
arr[0] = {};
}});

print(arr);
}

main();
````

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.