chakra-core / chakra-core/ChakraCore

"Illegal instruction " at ChakraCore/lib/Common/CommonPal.h:160

Open
#6,248 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

Following code can trigger this issue.
("Illegal instruction " at ChakraCore/lib/Common/CommonPal.h:160)
```
let v2 = "Nm" && [ ];
let v0 = v3 == false;
delete v3.replace;
this.v3(true);
function v3(...v1) {
for (v0 = v2.slice([ 10061.13653 ], [ ]); v1[3] += [ "vR", v1 ]; v3[0] >>>= [ null ]) {
}
v2.search = v3 && [ ];
this.v3([ v3, 10846.32615 ], v2.constructor);
for (v3 = v0.replace() ? v1(v0.prototype, [ "jaQH", v0 ]) : false; v3 != ")b4="; [ ] !== v3) {
}
}
v0.test();
v2[true] = new Date(v1.constructor);
```
And when ch is built with `--static --sanitize=address,undefined` option it triggers undefined behaviours.

OS: Ubuntu 18.04.1 LTS
Arch: x86_64

Contributor guide

Open the contributing guide

Research direction

Start at ChakraCore/lib/Common/CommonPal.h:160 and reproduce the JavaScript snippet on Ubuntu x86_64. Build ChakraCore with --static --sanitize=address,undefined, then inspect the reported undefined behavior and illegal-instruction path. Done means the reproducer no longer triggers the reported failure or sanitizer diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.