chakra-core / chakra-core/ChakraCore

ReportFatalException15

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

Description

# enviroment
ubuntu18
# poc
```
unction maybeSetLength(arr, b) {
if (b) {
arr.length = 2147483647;
}
}
var arr = [];
maybeSetLength(arr, arr);
for (var i = 0; i < 2000; i++) {
maybeSetLength(arr, i > 1500);
var res = arr.push(0.017453);
res = NaN >>> res;
JSON.stringify(arr);
}
```

# callstack
```
[#0] 0x555555d59fac → DebugBreak()
[#1] 0x555555d59fac → ReportFatalException(context=, exceptionCode=, reasonCode=, scenario=)
[#2] 0x555555d5a3a7 → OutOfMemory_unrecoverable_error()
[#3] 0x555557ef6673 → Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0)
[#4] 0x555555d5a929 → Js::Throw::OutOfMemory()
[#5] 0x555555e6ccae → Memory::Recycler::OutOfMemory(this=0x631000014800)
[#6] 0x555555e6ccae → Memory::Recycler::LargeAlloc(this=0x631000014800, heap=0x6310000181a8, size=0xc00000008, attributes=Memory::ObjectInfoBits::WithBarrierBit)
[#7] 0x555555bed949 → Memory::Recycler::RealAlloc<(Memory::ObjectInfoBits)256, false>(this=0x631000014800, heap=0x6310000181a8, size=0xc00000008)
[#8] 0x555555ca338b → Memory::Recycler::AllocWithAttributesInlined<(Memory::ObjectInfoBits)256, false>(this=0x631000014800, size=0xc00000008)
[#9] 0x5555580d2f9f → Memory::Recycler::AllocZeroWithAttributesInlined<(Memory::ObjectInfoBits)256, false>(this=, size=0xc00000008)

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the JavaScript PoC on Ubuntu 18 and tracing the reported ReportFatalException, OutOfMemory_unrecoverable_error, and Memory::Recycler::LargeAlloc call stack. No source file or test is named, so identify the allocation path and add a focused regression test once the failure is understood; done means the PoC no longer causes the reported fatal out-of-memory failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.