Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERTION (this->threadContext->GetRecordedException() == nullptr || GetThreadContext()->HasUnhandledException()) failed in Js::ScriptContext::RecordException #6007

Open
renatahodovan opened this issue Mar 9, 2019 · 0 comments
Assignees

Comments

@renatahodovan
Copy link

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:
WScript.LoadScriptFile(Error, Symbol.isConcatSpreadable);
Backtrace:
ASSERTION 11561: (ChakraCore/lib/Runtime/Base/ScriptContext.cpp, line 2816) this->threadContext->GetRecordedException() == nullptr || GetThreadContext()->HasUnhandledException()
 Failure: (this->threadContext->GetRecordedException() == nullptr || GetThreadContext()->HasUnhandledException())

Thread 1 "ch" received signal SIGILL, Illegal instruction.
0x0000555556e88e86 in Js::ScriptContext::RecordException (this=0x622000000158, exceptionObject=0x7ffff1f46af0, propagateToDebugger=false)
    at ChakraCore/lib/Runtime/Base/ScriptContext.cpp:2816
2816            Assert(this->threadContext->GetRecordedException() == nullptr || GetThreadContext()->HasUnhandledException());
(gdb) bt
#0  0x0000555556e88e86 in Js::ScriptContext::RecordException (this=0x622000000158, exceptionObject=0x7ffff1f46af0, propagateToDebugger=false)
    at ChakraCore/lib/Runtime/Base/ScriptContext.cpp:2816
#1  0x0000555556719b90 in JsSetException::$_75::operator() (this=0x7fffffff4700, scriptContext=0x622000000158, _actionEntryPopper=...) at ChakraCore/lib/Jsrt/Jsrt.cpp:3245
#2  0x00005555567194f1 in _JsErrorCode ContextAPINoScriptWrapper<JsSetException::$_75>(JsSetException::$_75, bool, bool)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (
    this=0x7fffffff4440, scriptContext=0x622000000158) at ChakraCore/lib/Jsrt/JsrtInternal.h:316
#3  0x0000555556718532 in ContextAPINoScriptWrapper_Core<_JsErrorCode ContextAPINoScriptWrapper<JsSetException::$_75>(JsSetException::$_75, bool, bool)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPINoScriptWrapper<JsSetException::$_75>(JsSetException::$_75, bool, bool)::{lambda(Js::ScriptContext*)#1}, bool, bool) (fn=..., allowInObjectBeforeCollectCallback=false, 
    scriptExceptionAllowed=false) at ChakraCore/lib/Jsrt/JsrtInternal.h:277
#4  0x000055555668e9e3 in ContextAPINoScriptWrapper<JsSetException::$_75> (fn=..., allowInObjectBeforeCollectCallback=false, scriptExceptionAllowed=false)
    at ChakraCore/lib/Jsrt/JsrtInternal.h:314
#5  0x000055555668e74c in JsSetException (exception=0x7ffff1db0480) at ChakraCore/lib/Jsrt/Jsrt.cpp:3234
#6  0x00005555564697c5 in ChakraRTInterface::JsSetException (exception=0x7ffff1db0480) at ChakraCore/bin/ch/ChakraRtInterface.h:429
#7  0x0000555556452a63 in WScriptJsrt::LoadScriptFileHelper (callee=0x7ffff1de1150, arguments=0x7fffffff51f0, argumentCount=3, isSourceModule=false)
    at ChakraCore/bin/ch/WScriptJsrt.cpp:261
#8  0x0000555556452129 in WScriptJsrt::LoadScriptFileCallback (callee=0x7ffff1de1150, isConstructCall=false, arguments=0x7fffffff51f0, argumentCount=3, callbackState=0x0)
    at ChakraCore/bin/ch/WScriptJsrt.cpp:201
#9  0x000055555668b771 in JsNativeFunctionWrapper (callee=0x7ffff1de1150, arguments=0x7fffffff51f0, argumentCount=3, info=0x7fffffff4e20, wrapperData=0x7ffff1f45080)
    at ChakraCore/lib/Jsrt/Jsrt.cpp:2921
#10 0x0000555558675016 in Js::JavascriptExternalFunction::StdCallExternalFunctionThunk (function=0x7ffff1de1150, callInfo=...)
    at ChakraCore/lib/Runtime/Library/JavascriptExternalFunction.cpp:305
#11 0x0000555558ded02e in amd64_CallFunction () at ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100
#12 0x000055555869c1e3 in Js::JavascriptFunction::CallFunction<true> (function=0x7ffff1de1150, 
    entryPoint=0x555558674030 <Js::JavascriptExternalFunction::StdCallExternalFunctionThunk(Js::RecyclableObject*, Js::CallInfo, ...)>, args=..., useLargeArgCount=false)
    at ChakraCore/lib/Runtime/Library/JavascriptFunction.cpp:1342
#13 0x000055555811ac57 in Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) (
    this=0x7fffffffa9a0, playout=0x7ffff1fb30ed, function=0x7ffff1de1150, flags=16, spreadIndices=0x0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3858
#14 0x0000555558119f4e in Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) (this=0x7fffffffa9a0, playout=0x7ffff1fb30ed, function=0x7ffff1de1150, flags=0, profileId=0, inlineCacheIndex=0, spreadIndices=0x0)
    at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3902
#15 0x0000555558042352 in Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > const __unaligned*) (this=0x7fffffffa9a0, playout=0x7ffff1fb30ed)
    at ChakraCore/lib/Runtime/./Language/InterpreterStackFrame.h:503
#16 0x0000555557bc1fdd in Js::InterpreterStackFrame::ProcessProfiled (this=0x7fffffffa9a0) at ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:87
#17 0x0000555557a89bf0 in Js::InterpreterStackFrame::Process (this=0x7fffffffa9a0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3357
#18 0x0000555557a86e43 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ffff1f46690, args=..., returnAddress=0x7ffff1d60fa2, addressOfReturnAddress=0x7fffffffb368, asmJsReturn=0x0)
    at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2051
#19 0x0000555557a84c23 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7fffffffb380) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1763
#20 0x00007ffff1d60fa2 in ?? ()
#21 0x00007fffffffb390 in ?? ()
#22 0x0000555558ded02e in amd64_CallFunction () at ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100
Backtrace stopped: frame did not save the PC

Found by Fuzzinator with grammarinator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants