chakra-core / chakra-core/ChakraCore

Aborted in ReportFatalException (Func::TryCodegen)

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

Description

jsish reversion
c3ead3f8a6e0bb8e32e043adc091c68cba5935e9
master

Build platform
Ubuntu 20.04 LTS (Linux 5.4.0-1018-aws x86_64)

Build steps
```sh
./build.sh
./ch poc.js
```

Test case
poc.js
```javascript
try {
(function TestFunc() {
var a;
(function outer() {
(function inner() { outer() })();
try {
throw "Exception";
}
catch (ex) {
with ({}) { outer(); }
}
})();
})();
}
catch (ex) {
if (ex.message == "Out of stack space") {
WScript.Echo("PASSED");
}
}
```

Backtrace
```sh
#0 0x00007fffecf92d27 in DebugBreak () at ../../lib/Common/CommonPal.h:161
#1 ReportFatalException (context=, exceptionCode=,
reasonCode=, scenario=)
at ../../lib/Common/Exceptions/ReportError.cpp:20
#2 0x00007fffec78177b in IRBuilder::DoClosureRegCheck (this=0x7ff7eaa80de8, reg=6)
at ../../lib/Backend/IRBuilder.cpp:7803
#3 0x00007fffec767596 in IRBuilder::BuildReg1 > (
this=, newOpcode=, offset=)
at ../../lib/Backend/IRBuilder.cpp:1486
#4 IRBuilder::Build (this=)
at ../../lib/Backend/../Runtime/ByteCode/LayoutTypes.h:47
#5 0x00007fffec53d034 in Func::TryCodegen (this=0x7ff7eaa816f8) at ../../lib/Backend/Func.cpp:422
#6 0x00007fffec53cb65 in Func::Codegen (alloc=0x7ff7eaa81b38, workItem=0x7ff7ea1c1030,
threadContextInfo=0x55555592b3b0, scriptContextInfo=0x555555953620, outputData=0x7ff7eaa81c60,
epInfo=0x7ff7ea229120, runtimeInfo=,
polymorphicInlineCacheInfo=, codeGenAllocators=,
codeGenProfiler=0x0, isBackgroundJIT=) at ../../lib/Backend/Func.cpp:325
#7 0x00007fffecbaae3e in NativeCodeGenerator::CodeGen (this=,
pageAllocator=, workItemData=, jitWriteData=...,
foreground=, epInfo=)
at ../../lib/Backend/NativeCodeGenerator.cpp:890
#8 0x00007fffecbab4c9 in NativeCodeGenerator::CodeGen (this=, pageAllocator=
0x555555954310, workItem=0x5555559650c0, foreground=)
at ../../lib/Backend/NativeCodeGenerator.cpp:1007
#9 0x00007fffecbad02f in NativeCodeGenerator::Process (this=0x5555559177a0, job=,
threadData=0x5555559542f0) at ../../lib/Backend/NativeCodeGenerator.cpp:1907
#10 0x00007fffecf7059a in JsUtil::BackgroundJobProcessor::Process (this=,
job=0xffffffda, threadData=0x0) at ../../lib/Common/Common/Jobs.cpp:1037
#11 0x00007fffecf709c7 in JsUtil::BackgroundJobProcessor::Run (this=0x555555953d90,
threadData=0x5555559542f0) at ../../lib/Common/Common/Jobs.cpp:1135
#12 0x00007fffecf6e25f in JsUtil::BackgroundJobProcessor::StaticThreadProc (lpParam=0x5555559542f0)
at ../../lib/Common/Common/Jobs.cpp:1319
#13 0x00007fffec05e125 in CorUnix::CPalThread::ThreadEntry (pvParam=0x555555954680)
at ../../pal/src/thread/pal_thread.cpp:1554
---Type to continue, or q to quit---
```

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.