chakra-core / chakra-core/ChakraCore
ASSERTION (scopeSlotCount != 0) failed in Js::InterpreterStackFrame::NewScopeSlots
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
###### ChakraCore version:
```
Checked revision: 39f9727ef
Build command: ./build.sh --debug
```
###### OS:
```
Linux-4.15.0-43-generic-x86_64-with-Ubuntu-18.04-bionic
```
###### Test case:
```js
(function() {
(function outer() {
function $() {
var $ = outer
}
with ($) { outer() }
})()
})()
```
###### Backtrace:
```text
ASSERTION 24541: (ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp, line 7473) scopeSlotCount != 0
Failure: (scopeSlotCount != 0)
Thread 1 "ch" received signal SIGILL, Illegal instruction.
0x0000555557a834ab in Js::InterpreterStackFrame::NewScopeSlots (this=0x7ffffffee360)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:7473
7473 Assert(scopeSlotCount != 0);
(gdb) bt
#0 0x0000555557a834ab in Js::InterpreterStackFrame::NewScopeSlots (this=0x7ffffffee360)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:7473
#1 0x0000555557a82b81 in Js::InterpreterStackFrame::InitializeClosures (this=0x7ffffffee360)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1498
#2 0x0000555557bba374 in Js::InterpreterStackFrame::ProcessProfiled (this=0x7ffffffee360)
at ChakraCore/lib/Runtime/Language/InterpreterLoop.inl:169
#3 0x0000555557a89bf0 in Js::InterpreterStackFrame::Process (this=0x7ffffffee360)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3357
#4 0x0000555557a86e43 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ffff1f46780, args=...,
returnAddress=0x7ffff1d60f92, addressOfReturnAddress=0x7ffffffeed38, asmJsReturn=0x0)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2051
#5 0x0000555557a84c23 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7ffffffeed50)
at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1763
#6 0x00007ffff1d60f92 in ?? ()
#7 0x00007ffffffeed70 in ?? ()
#8 0x0000555558ded02e in amd64_CallFunction ()
at ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100
Backtrace stopped: frame did not save the PC
```
Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator).
Contributor guide
Assessment
This issue has not been assessed yet.