chakra-core / chakra-core/ChakraCore
[Bug]: Assertion Failure this->pCurrentFunction->LengthInChars() == pnodeFnc->LengthInCodepoints() in /lib/Runtime/ByteCode/ByteCodeGenerator.cpp, line 1333
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### ChakraCore Version
13358c622f6cf7ce3d2512a170513fc5cb6021cd
### Steps to reproduce
## Build
```
./build.sh --static --debug --sanitize=address --no-jit
```
## Run
```
ch ./poc.js -200000
```
### Proof of concept
```js
String ` hello ` ; y = { d : ( a = void eval `
$$$$ ` . map ( function ( arg1 , ... [ c = s ] ) { return this . constructor ( ... [ bar ] = [ [ { c } = { 0b1_000_000 : 2 } ] = [ item2 = 0 ] ] ) . constructor ( ... [ bar ] = [ undefined = 42 ] ) . join ( function stuff ( a , ) { import ( async => y ) . finally ( eval => b ?? import ( async => a && ( a && new b ( c ) && d == b ) / 2 << c ) ) ; } ) + 4 + 0x1ABCDEFabcdef + 0x1ABCDEFabcdef ; } ) . map ( eval ) , a = void import ( { d : ( a = void import ( '
大阪府 ' ) , a = void stuff ( { 3.14e+1 : 0o1_1 } ) ) } ) ) } ;
```
### Exception or Error
```text
ASSERTION: (/home/user/repo/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp, line 1333) this->pCurrentFunction->LengthInChars() == pnodeFnc->LengthInCodepoints()
Failure: (this->pCurrentFunction->LengthInChars() == pnodeFnc->LengthInCodepoints())
Illegal instruction
```
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.