issue_owner_repo
listlengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
925
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
2.5k
issue_created_at
stringlengths
20
20
issue_updated_at
stringlengths
20
20
issue_html_url
stringlengths
37
62
issue_github_id
int64
387k
2.46B
issue_number
int64
1
127k
[ "chakra-core", "ChakraCore" ]
###### 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 WScript.LoadScriptFile(Error, Symbol.isConcatSpreadable); ``` ###### Backtrace: ```text 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 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
ASSERTION (this->threadContext->GetRecordedException() == nullptr || GetThreadContext()->HasUnhandledException()) failed in Js::ScriptContext::RecordException
https://api.github.com/repos/chakra-core/ChakraCore/issues/6007/comments
0
2019-03-09T11:55:50Z
2019-03-11T00:57:32Z
https://github.com/chakra-core/ChakraCore/issues/6007
419,064,127
6,007
[ "chakra-core", "ChakraCore" ]
###### 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 write() { var y = function() {}; Object.prototype["qfxhma"] = function(){ throw $ }; function shapeyConstructor($) { qfxhma(); Object($, ({$: (function() {})})) } for (var $ in []) { try { shapeyConstructor() } catch ( $ ) { } } qfxhma = y; } for (var $;;) { write() } ``` ###### Backtrace: ```text ASSERTION 22494: (ChakraCore/lib/Backend/DbCheckPostLower.cpp, line 130) (instrPrev->IsBranchInstr() && instrPrev->AsBranchInstr()->IsConditional() && (!instrPrev->AsBranchInstr()->GetTarget()->isOpHelper || instrPrev->AsBranchInstr()->GetTarget()->m_noHelperAssert)) Failure: ((instrPrev->IsBranchInstr() && instrPrev->AsBranchInstr()->IsConditional() && (!instrPrev->AsBranchInstr()->GetTarget()->isOpHelper || instrPrev->AsBranchInstr()->GetTarget()->m_noHelperAssert))) Thread 3 "ch" received signal SIGILL, Illegal instruction. [Switching to Thread 0x7ff7ebfff700 (LWP 22687)] 0x000055555a9cdaa7 in DbCheckPostLower::Check (this=0x7ff7ebffb0a0) at ChakraCore/lib/Backend/DbCheckPostLower.cpp:129 129 Assert((instrPrev->IsBranchInstr() && instrPrev->AsBranchInstr()->IsConditional() (gdb) bt #0 0x000055555a9cdaa7 in DbCheckPostLower::Check (this=0x7ff7ebffb0a0) at ChakraCore/lib/Backend/DbCheckPostLower.cpp:129 #1 0x000055555a232287 in Func::EndPhase (this=0x7ff7ebffcbe0, tag=Js::Phase::RegAllocPhase, dump=true) at ChakraCore/lib/Backend/Func.cpp:1357 #2 0x000055555999536c in AutoCodeGenPhase::~AutoCodeGenPhase (this=0x7ff7ebffbd50) at ChakraCore/lib/Backend/Func.h:1127 #3 0x000055555a228b24 in Func::TryCodegen (this=0x7ff7ebffcbe0) at ChakraCore/lib/Backend/Func.cpp:495 #4 0x000055555a226ca0 in Func::Codegen (alloc=0x7ff7ebffd4a0, workItem=0x7ff7f04a1030, threadContextInfo=0x623000000198, scriptContextInfo=0x622000000158, outputData=0x7ff7ebffdad0, epInfo= 0x7ffff1dac240, runtimeInfo=0x0, polymorphicInlineCacheInfo=0x7ffff1d1be20, codeGenAllocators=0x61a0000006d8, codeGenProfiler=0x0, isBackgroundJIT=true) at ChakraCore/lib/Backend/Func.cpp:323 #5 0x0000555559c07f42 in NativeCodeGenerator::CodeGen (this=0x613000000958, pageAllocator=0x615000001ef8, workItemData=0x6120000006c0, jitWriteData=..., foreground=false, epInfo=0x7ffff1dac240) at ChakraCore/lib/Backend/NativeCodeGenerator.cpp:894 #6 0x0000555559c0c3a6 in NativeCodeGenerator::CodeGen (this=0x613000000958, pageAllocator=0x615000001ef8, workItem=0x612000000698, foreground=false) at ChakraCore/lib/Backend/NativeCodeGenerator.cpp:1011 #7 0x0000555559c138b8 in NativeCodeGenerator::Process (this=0x613000000958, job=0x6120000006a0, threadData=0x615000001ed8) at ChakraCore/lib/Backend/NativeCodeGenerator.cpp:1907 #8 0x0000555559d66a1c in JsUtil::BackgroundJobProcessor::Process (this=0x612000000098, job=0x6120000006a0, threadData=0x615000001ed8) at ChakraCore/lib/Common/Common/Jobs.cpp:1037 #9 0x0000555559d67a1a in JsUtil::BackgroundJobProcessor::Run (this=0x612000000098, threadData=0x615000001ed8) at ChakraCore/lib/Common/Common/Jobs.cpp:1135 #10 0x0000555559d5e466 in JsUtil::BackgroundJobProcessor::StaticThreadProc (lpParam=0x615000001ed8) at ChakraCore/lib/Common/Common/Jobs.cpp:1319 #11 0x00005555565f12b2 in CorUnix::CPalThread::ThreadEntry (pvParam=0x61c000001080) at ChakraCore/pal/src/thread/pal_thread.cpp:1605 #12 0x00005555563ffb1f in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) () #13 0x00007ffff73656db in start_thread (arg=0x7ff7ebfff700) at pthread_create.c:463 #14 0x00007ffff66cc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
ASSERTION (instrPrev->IsBranchInstr() && instrPrev->AsBranchInstr()->IsConditional() && (!instrPrev->AsBranchInstr()->GetTarget()->isOpHelper || instrPrev->AsBranchInstr()->GetTarget()->m_noHelperAssert)) failed in DbCheckPostLower::Check
https://api.github.com/repos/chakra-core/ChakraCore/issues/6006/comments
1
2019-03-09T11:21:19Z
2019-06-07T18:24:52Z
https://github.com/chakra-core/ChakraCore/issues/6006
419,061,073
6,006
[ "chakra-core", "ChakraCore" ]
###### 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 var tests = [0, 0]; tests.forEach(function() { var eval = WScript.LoadScript(0, "samethread").eval; eval(0); }); ``` ###### Backtrace: ```text ASSERTION 25988: (ChakraCore/lib/Runtime/Library/ArgumentsObject.cpp, line 38) !frameObject || VarIsCorrectType(frameObject) Failure: (!frameObject || VarIsCorrectType(frameObject)) Thread 1 "ch" received signal SIGILL, Illegal instruction. 0x00005555583e9a62 in Js::HeapArgumentsObject::HeapArgumentsObject (this=0x7ffff1d1e580, recycler=0x632000000858, obj= 0x7ffff1d084b0, formalCount=0, type=0x7ffff1f43e40) at ChakraCore/lib/Runtime/Library/ArgumentsObject.cpp:38 38 Assert(!frameObject || VarIsCorrectType(frameObject)); (gdb) bt #0 0x00005555583e9a62 in Js::HeapArgumentsObject::HeapArgumentsObject (this=0x7ffff1d1e580, recycler=0x632000000858, obj=0x7ffff1d084b0, formalCount=0, type=0x7ffff1f43e40) at ChakraCore/lib/Runtime/Library/ArgumentsObject.cpp:38 #1 0x00005555586f2185 in Js::JavascriptLibrary::CreateHeapArguments (this=0x7ffff1f58000, frameObj=0x7ffff1d084b0, formalCount=0, isStrictMode=false) at ChakraCore/lib/Runtime/Library/JavascriptLibrary.cpp:5555 #2 0x00005555581dedf8 in Js::JavascriptOperators::CreateHeapArguments (funcCallee=0x7ffff1d08460, actualsCount=3, formalsCount=0, frameObj=0x7ffff1d084b0, scriptContext=0x622000000158) at ChakraCore/lib/Runtime/Language/JavascriptOperators.cpp:7443 #3 0x00005555581dfdfc in Js::JavascriptOperators::LoadHeapArgsCached (funcCallee=0x7ffff1d08460, actualsCount=3, formalsCount=0, paramAddr=0x7ffffffee818, frameObj=0x7ffff1d084b0, scriptContext=0x622000000158, nonSimpleParamList=false) at ChakraCore/lib/Runtime/Language/JavascriptOperators.cpp:7338 #4 0x000055555801c166 in Js::InterpreterStackFrame::OP_LdHeapArgsCached (this=0x7ffffffeddc0, scriptContext=0x622000000158) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:9262 #5 0x0000555557bdb772 in Js::InterpreterStackFrame::ProcessProfiled (this=0x7ffffffeddc0) at ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:307 #6 0x0000555557a89bf0 in Js::InterpreterStackFrame::Process (this=0x7ffffffeddc0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3357 #7 0x0000555557a86e43 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ffff1d08460, args=..., returnAddress=0x7ffff1d60f7a, addressOfReturnAddress=0x7ffffffee7e8, asmJsReturn=0x0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2051 #8 0x0000555557a84c23 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7ffffffee800) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1763 #9 0x00007ffff1d60f7a in ?? () #10 0x00007ffffffee830 in ?? () #11 0x0000555558ded02e in amd64_CallFunction () at ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 Backtrace stopped: frame did not save the PC ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
ASSERTION (!frameObject || VarIsCorrectType(frameObject) failed in Js::HeapArgumentsObject::HeapArgumentsObject
https://api.github.com/repos/chakra-core/ChakraCore/issues/5998/comments
0
2019-03-08T11:30:17Z
2019-03-11T00:57:04Z
https://github.com/chakra-core/ChakraCore/issues/5998
418,749,297
5,998
[ "chakra-core", "ChakraCore" ]
###### 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 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
ASSERTION (scopeSlotCount != 0) failed in Js::InterpreterStackFrame::NewScopeSlots
https://api.github.com/repos/chakra-core/ChakraCore/issues/5997/comments
1
2019-03-08T09:50:40Z
2019-03-11T00:56:22Z
https://github.com/chakra-core/ChakraCore/issues/5997
418,712,096
5,997
[ "chakra-core", "ChakraCore" ]
###### 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 $() { "use asm" ( ); return } ``` ###### Backtrace: ```text ASSERTION 21735: (ChakraCore/lib/Runtime/Language/AsmJsUtils.cpp, line 40) this should be use asm Failure: (lhs->nop == knopStr) Thread 1 "ch" received signal SIGILL, Illegal instruction. 0x00005555579e7998 in Js::ParserWrapper::ParseVarOrConstStatement (parser=@0x7fffffff9380: 0x7ffff1d82220, var=0x7fffffff8c40) at ChakraCore/lib/Runtime/Language/AsmJsUtils.cpp:40 40 AssertMsg( lhs->nop == knopStr, "this should be use asm" ); (gdb) bt #0 0x00005555579e7998 in Js::ParserWrapper::ParseVarOrConstStatement (parser=@0x7fffffff9380: 0x7ffff1d82220, var=0x7fffffff8c40) at ChakraCore/lib/Runtime/Language/AsmJsUtils.cpp:40 #1 0x0000555559f61063 in Js::AsmJSCompiler::CheckModuleGlobals (m=...) at ChakraCore/lib/Runtime/Language/AsmJs.cpp:599 #2 0x0000555559f64819 in Js::AsmJSCompiler::CheckModule (cx=0x7fffffff9480, parser=@0x7fffffff9380: 0x7ffff1d82220, stmtList=0x0) at ChakraCore/lib/Runtime/Language/AsmJs.cpp:1029 #3 0x0000555559f64d85 in Js::AsmJSCompiler::Compile (cx=0x7fffffff9480, parser=0x7ffff1d82220, stmtList=0x0) at ChakraCore/lib/Runtime/Language/AsmJs.cpp:1087 #4 0x0000555559eb94fe in ByteCodeGenerator::EmitScopeList (this=0x7fffffffa040, pnode=0x7ffff1d82220, breakOnBodyScopeNode=0x0) at ChakraCore/lib/Runtime/ByteCode/ByteCodeEmitter.cpp:3427 #5 0x0000555559eb9bee in ByteCodeGenerator::EmitScopeList (this=0x7fffffffa040, pnode=0x7ffff1d82170, breakOnBodyScopeNode=0x0) at ChakraCore/lib/Runtime/ByteCode/ByteCodeEmitter.cpp:3484 #6 0x0000555559eb9832 in ByteCodeGenerator::EmitScopeList (this=0x7fffffffa040, pnode=0x7ffff1d82030, breakOnBodyScopeNode=0x0) at ChakraCore/lib/Runtime/ByteCode/ByteCodeEmitter.cpp:3468 #7 0x0000555559eb923b in ByteCodeGenerator::EmitProgram (this=0x7fffffffa040, pnodeProg=0x7ffff1d82030) at ChakraCore/lib/Runtime/ByteCode/ByteCodeEmitter.cpp:2564 #8 0x000055555710b841 in ByteCodeGenerator::Generate (pnodeProg=0x7ffff1d82030, grfscr=4112, byteCodeGenerator=0x7fffffffa040, ppRootFunc=0x7fffffffa4a0, sourceIndex=0, forceNoNative=false, parser=0x7fffffffa910, functionRef=0x0) at ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2027 #9 0x00005555571157e9 in GenerateByteCode (pnode=0x7ffff1d82030, grfscr=4112, scriptContext=0x622000000158, ppRootFunc=0x7fffffffa4a0, sourceIndex=0, forceNoNative=false, parser=0x7fffffffa910, pse=0x7fffffffc360, parentScopeInfo=0x0, functionRef=0x0) at ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2198 #10 0x0000555556e872fd in Js::ScriptContext::GenerateRootFunction (this=0x622000000158, parseTree=0x7ffff1d82030, sourceIndex=0, parser=0x7fffffffa910, grfscr=4112, pse=0x7fffffffc360, rootDisplayName=0x55555ab24060 <Js::Constants::GlobalCode> u"Global code") at ChakraCore/lib/Runtime/Base/ScriptContext.cpp:2624 #11 0x0000555556e8698e in Js::ScriptContext::LoadScriptInternal (this=0x622000000158, parser=0x7fffffffa910, script=0x6040000006d0 "function $() {\n\t\"use asm\" \n\t( );\n\treturn\n}", cb=44, pSrcInfo=0x7fffffffb660, pse=0x7fffffffc360, ppSourceInfo=0x7fffffffb6b0, rootDisplayName=0x55555ab24060 <Js::Constants::GlobalCode> u"Global code", loadScriptFlag=(LoadScriptFlag_Utf8Source | LoadScriptFlag_ExternalArrayBuffer), scriptSource=0x7ffff1da8000) at ChakraCore/lib/Runtime/Base/ScriptContext.cpp:2562 #12 0x0000555556e87bbd in Js::ScriptContext::LoadScript (this=0x622000000158, script=0x6040000006d0 "function $() {\n\t\"use asm\" \n\t( );\n\treturn\n}", cb=44, pSrcInfo=0x7fffffffb660, pse=0x7fffffffc360, ppSourceInfo=0x7fffffffb6b0, rootDisplayName=0x55555ab24060 <Js::Constants::GlobalCode> u"Global code", loadScriptFlag=(LoadScriptFlag_Utf8Source | LoadScriptFlag_ExternalArrayBuffer), scriptSource=0x7ffff1da8000) at ChakraCore/lib/Runtime/Base/ScriptContext.cpp:2600 #13 0x000055555672526a in RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84::operator()(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const ( this=0x7fffffffc000, scriptContext=0x622000000158, _actionEntryPopper=...) at ChakraCore/lib/Jsrt/Jsrt.cpp:3611 #14 0x0000555556723da1 in _JsErrorCode ContextAPINoScriptWrapper<RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84, bool, bool)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (this=0x7fffffffbd40, scriptContext=0x622000000158) at ChakraCore/lib/Jsrt/JsrtInternal.h:316 #15 0x0000555556722de2 in ContextAPINoScriptWrapper_Core<_JsErrorCode ContextAPINoScriptWrapper<RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84, bool, bool)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPINoScriptWrapper<RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84, bool, bool)::{lambda(Js::ScriptContext*)#1}, bool, bool) (fn=..., allowInObjectBeforeCollectCallback=false, scriptExceptionAllowed=false) at ChakraCore/lib/Jsrt/JsrtInternal.h:277 #16 0x000055555669236a in ContextAPINoScriptWrapper<RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_84, bool, bool) (fn=..., allowInObjectBeforeCollectCallback=false, scriptExceptionAllowed=false) at ChakraCore/lib/Jsrt/JsrtInternal.h:314 #17 0x0000555556691d6f in RunScriptCore (scriptSource=0x7ffff1da8000, script=0x6040000006d0 "function $() {\n\t\"use asm\" \n\t( );\n\treturn\n}", cb=44, loadScriptFlag=(LoadScriptFlag_Utf8Source | LoadScriptFlag_ExternalArrayBuffer), sourceContext=0, sourceUrl=0x7ffff1fad3c0 u"ChakraCore/test.js", parseOnly=false, parseAttributes=JsParseScriptAttributeNone, isSourceModule=false, result=0x0) at ChakraCore/lib/Jsrt/Jsrt.cpp:3555 #18 0x000055555669c797 in CompileRun (scriptVal=0x7ffff1da8000, sourceContext=0, sourceUrl=0x7ffff1de4f90, parseAttributes=JsParseScriptAttributeNone, result=0x0, parseOnly=false) at ChakraCore/lib/Jsrt/Jsrt.cpp:5019 #19 JsRun (scriptVal=0x7ffff1da8000, sourceContext=0, sourceUrl=0x7ffff1de4f90, parseAttributes=JsParseScriptAttributeNone, result=0x0) at ChakraCore/lib/Jsrt/Jsrt.cpp:5041 #20 0x00005555564393b3 in ChakraRTInterface::JsRun (script=0x7ffff1da8000, sourceContext=0, sourceUrl=0x7ffff1de4f90, parseAttributes=JsParseScriptAttributeNone, result=0x0) at ChakraCore/bin/ch/ChakraRtInterface.h:483 #21 0x000055555643179d in RunScript (fileName=0x6030000000d0 "test.js", fileContents=0x6040000006d0 "function $() {\n\t\"use asm\" \n\t( );\n\treturn\n}", fileLength=44, fileContentsFinalizeCallback=0x555556452bf0 <WScriptJsrt::FinalizeFree(void*)>, bufferValue=0x0, fullPath=0x7fffffffd0c0 "ChakraCore/test.js", parserStateCache=0x0) at ChakraCore/bin/ch/ch.cpp:491 #22 0x000055555643657d in ExecuteTest (fileName=0x6030000000d0 "test.js") at ChakraCore/bin/ch/ch.cpp:966 #23 0x000055555643678c in ExecuteTestWithMemoryCheck (fileName=0x6030000000d0 "test.js") at ChakraCore/bin/ch/ch.cpp:1016 #24 0x0000555556437e79 in main (argc=2, c_argv=0x7fffffffde38) at ChakraCore/bin/ch/ch.cpp:1323 ``` <sup>Found by [Fuzzinator](http://fuzzinator.readthedocs.io/) with [grammarinator](https://github.com/renatahodovan/grammarinator). </sup>
ASSERTION (lhs->nop == knopStr) failed in Js::ParserWrapper::ParseVarOrConstStatement
https://api.github.com/repos/chakra-core/ChakraCore/issues/5996/comments
0
2019-03-08T09:41:57Z
2019-04-08T18:17:35Z
https://github.com/chakra-core/ChakraCore/issues/5996
418,708,765
5,996
[ "chakra-core", "ChakraCore" ]
The release build crashes due to null dereference and debug build crashes with assertion failure at lib/Parser/Parse.cpp:9364. PoC: ``` for ([(Object => {}).var_0[[]]] in []); ``` Commit: 39f9727 Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Parser/Parse.cpp:9364
https://api.github.com/repos/chakra-core/ChakraCore/issues/5995/comments
1
2019-03-08T08:11:09Z
2019-03-08T08:16:27Z
https://github.com/chakra-core/ChakraCore/issues/5995
418,678,397
5,995
[ "chakra-core", "ChakraCore" ]
The debug build crashes with assertion failure at lib/Parser/Parse.cpp:7491. PoC: ``` for (var var_01 = () => [].var_02[0][0](function (x, y) {}().var_03) in var_04) { // \0asm\x01\0\0\0\x01À\x80\x80\x80\0\r`\x02\x7F\x7F\x01\x7F`\x02~~\x01\x7F`\x02}}\x01\x7F`\x02||\x01\x7F`\0\0`\0\x01\x7F`\0\x01~`\0\x01}`\0\x01|`\x02\x7F\x7F\0`\x02~~\0`\x02}}\0`\x02||\0\x03\x84\x81\x80\x80\0\x82\x01\0\0\x01\x01\x02\x02\x03\x03\x04\x04\x05\x05\x05\x05\x05\x05\x06\x06\x06\x05\x05\x07\x07\x07\x05\x05\b\b\b\x05\x05\t\n\x0B\f\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x04\x85\x80\x80\x80\0\x01p\x01\b\b\x05\x83\x80\x80\x80\0\x01\0\x01\x07ª\x88\x80\x80\0_\x07i32_add\0#\x07i32_sub\0$\x07i32_mul\0%\ti32_div_s\0&\ti32_div_u\0\'\ti32_rem_s\0(\ti32_rem_u\0)\x07i32_and\0*\x06i32_or\0+\x07i32_xor\0,\x07i32_shl\0-\ti32_shr_u\0.\ti32_shr_s\0/\x06i32_eq\x000\x06i32_ne\x001\bi32_lt_s\x002\bi32_le_s\x003\bi32_lt_u\x004\bi32_le_u\x005\bi32_gt_s\x006\bi32_ge_s\x007\bi32_gt_u\x008\bi32_ge_u\x009\ti32_store\0:\ni32_store8\0;\x0Bi32_store16\0<\bi32_call\0=\x11i32_call_indirect\0>\ni32_select\0?\x07i64_add\0@\x07i64_sub\0A\x07i64_mul\0B\ti64_div_s\0C\ti64_div_u\0D\ti64_rem_s\0E\ti64_rem_u\0F\x07i64_and\0G\x06i64_or\0H\x07i64_xor\0I\x07i64_shl\0J\ti64_shr_u\0K\ti64_shr_s\0L\x06i64_eq\0M\x06i64_ne\0N\bi64_lt_s\0O\bi64_le_s\0P\bi64_lt_u\0Q\bi64_le_u\0R\bi64_gt_s\0S\bi64_ge_s\0T\bi64_gt_u\0U\bi64_ge_u\0V\ti64_store\0W\ni64_store8\0X\x0Bi64_store16\0Y\x0Bi64_store32\0Z\bi64_call\0[\x11i64_call_indirect\0\\\ni64_select\0]\x07f32_add\0^\x07f32_sub\0_\x07f32_mul\0`\x07f32_div\0a\ff32_copysign\0b\x06f32_eq\0c\x06f32_ne\0d\x06f32_lt\0e\x06f32_le\0f\x06f32_gt\0g\x06f32_ge\0h\x07f32_min\0i\x07f32_max\0j\tf32_store\0k\bf32_call\0l\x11f32_call_indirect\0m\nf32_select\0n\x07f64_add\0o\x07f64_sub\0p\x07f64_mul\0q\x07f64_div\0r\ff64_copysign\0s\x06f64_eq\0t\x06f64_ne\0u\x06f64_lt\0v\x06f64_le\0w\x06f64_gt\0x\x06f64_ge\0y\x07f64_min\0z\x07f64_max\0{\tf64_store\0|\bf64_call\0}\x11f64_call_indirect\0~\nf64_select\0\x7F\x05br_if\0\x80\x01\bbr_table\0\x81\x01\t\x8E\x80\x80\x80\0\x01\0A\0\x0B\b\0\x01\x02\x03\x04\x05\x06\x07\n\xB2\x91\x80\x80\0\x82\x01\x84\x80\x80\x80\0\0A\x7F\x0B\x84\x80\x80\x80\0\0A~\x0B\x84\x80\x80\x80\0\0A\x7F\x0B\x84\x80\x80\x80\0\0A~\x0B\x84\x80\x80\x80\0\0A\x7F\x0B\x84\x80\x80\x80\0\0A~\x0B\x84\x80\x80\x80\0\0A\x7F\x0B\x84\x80\x80\x80\0\0A~\x0B\x89\x80\x80\x80\0\0A\bA\x006\x02\0\x0B\xA7\x80\x80\x80\0\0A\x0BA\n-\0\0:\0\0A\nA\t-\0\0:\0\0A\tA\b-\0\0:\0\0A\bA}:\0\0\x0B\x87\x80\x80\x80\0\0A\b(\x02\0\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x01:\0\0A\0\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x02:\0\0A\x01\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x03:\0\0A\x01\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x04:\0\0A\0\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x05:\0\0A\0\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x01:\0\0B\0\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x02:\0\0B\x01\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x03:\0\0B\x01\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x04:\0\0A\x02\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x05:\0\0A\0\x0B\x90\x80\x80\x80\0\0\x10\tA\bA\x01:\0\0C\0\0\0\0\x0B\x90\x80\x80\x80\0\0\x10\tA\bA\x02:\0\0C\0\0\x80?\x0B\x90\x80\x80\x80\0\0\x10\tA\bA\x03:\0\0C\0\0\x80?\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x04:\0\0A\x04\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x05:\0\0A\0\x0B\x94\x80\x80\x80\0\0\x10\tA\bA\x01:\0\0D\0\0\0\0\0\0\0\0\x0B\x94\x80\x80\x80\0\0\x10\tA\bA\x02:\0\0D\0\0\0\0\0\0ð?\x0B\x94\x80\x80\x80\0\0\x10\tA\bA\x03:\0\0D\0\0\0\0\0\0ð?\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x04:\0\0A\x06\x0B\x8D\x80\x80\x80\0\0\x10\tA\bA\x05:\0\0A\0\x0B\x82\x80\x80\x80\0\0\x0B\x82\x80\x80\x80\0\0\x0B\x82\x80\x80\x80\0\0\x0B\x82\x80\x80\x80\0\0\x0B\x8C\x80\x80\x80\0\0\x10\b\x10\x0B\x10\fj\x1A\x10\n\x0B\x8C\x80\x80\x80\0\0\x10\b\x10\x0B\x10\fk\x1A\x10\n\x0B\x8C\x80\x80\x80\0\0\x10\b\x10\x0B\x10\fl\x1A\x10\n\x0B\x8C\x80\x80\x80\0\0\x10\b\x10\x0B\x10\fm\x1A\x10\n\x01\0\0\0\x01À\x80\x80\x80\0\r`\x2 } ``` Commit: 39f9727 Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Parser/Parse.cpp:7491
https://api.github.com/repos/chakra-core/ChakraCore/issues/5994/comments
0
2019-03-08T07:27:43Z
2019-04-11T19:14:29Z
https://github.com/chakra-core/ChakraCore/issues/5994
418,666,051
5,994
[ "chakra-core", "ChakraCore" ]
The debug build crashes with assertion failure at lib/Common/Common/NumberUtilities_strtod.cpp:2725. PoC: ``` var var_0 = new Array(1024); for (var var_1 = 0; ; var_1 += 1024) { var_0[var_1] = String.fromCodePoint(var_1); } ``` Commit: 39f9727 Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Common/Common/NumberUtilities_strtod.cpp:2725
https://api.github.com/repos/chakra-core/ChakraCore/issues/5993/comments
1
2019-03-08T05:41:37Z
2019-04-16T00:20:43Z
https://github.com/chakra-core/ChakraCore/issues/5993
418,640,346
5,993
[ "chakra-core", "ChakraCore" ]
The debug build crashes at lib/Backend/BackwardPass.cpp:7871. PoC: ``` func_0().d0(); function func_0() { 'use asm'; function func_1() { do { } while (1); } return { d0: func_1 }; } ``` Commit: e149067 Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Backend/BackwardPass.cpp:7871
https://api.github.com/repos/chakra-core/ChakraCore/issues/5990/comments
0
2019-03-06T06:34:25Z
2019-04-16T00:19:50Z
https://github.com/chakra-core/ChakraCore/issues/5990
417,645,263
5,990
[ "chakra-core", "ChakraCore" ]
Hello, I run following code in ch 1.11.6.0, the result is wrong. TypeError should be thrown when returns duplicate entries. ``` var proxy = new Proxy({}, { ownKeys: function(target) { print("in ownKeys"); return ['a','b','a']; }, }); print(Reflect.ownKeys(proxy)); print("BT_FLAG"); ``` SpiderMonkey and V8 throw a TypeError: 'ownKeys' on proxy: trap returned duplicate entries, However, ChakraCore and JavascriptCore execute without failures. BT group 2019.3.5
Wrong Realization of Reflect.ownKeys
https://api.github.com/repos/chakra-core/ChakraCore/issues/5988/comments
1
2019-03-05T06:27:56Z
2019-03-11T17:29:52Z
https://github.com/chakra-core/ChakraCore/issues/5988
417,138,400
5,988
[ "chakra-core", "ChakraCore" ]
If there are many module scripts `<script type="module">` in the web page, Edge will load these scripts but not execute them. ## Edge version - Edge 44.17763.1.0 - EdgeHTML 18.17763 ## Minimal reproducible example https://gist.github.com/5fe16e41e153c2c41575c88ee1bea778.git ## Steps open the page and devtools, check the console output. ## Expected behavior screenshot from Chrome: ![image](https://user-images.githubusercontent.com/7829098/53677311-be0b4680-3ce8-11e9-855c-b4fa6a4d0876.png) ## Actual behavior screenshot from Edge: ![image](https://user-images.githubusercontent.com/7829098/53677334-2b1edc00-3ce9-11e9-81be-d09bcb271e1c.PNG) My page impacted by this issue: https://magic-akari.github.io/lrc-maker
Edge not execute scripts if there are many module scripts
https://api.github.com/repos/chakra-core/ChakraCore/issues/5986/comments
2
2019-03-02T04:49:19Z
2019-03-05T20:12:00Z
https://github.com/chakra-core/ChakraCore/issues/5986
416,357,897
5,986
[ "chakra-core", "ChakraCore" ]
There seems to be an issue after upgrading to emscripten v1.38.28 within the Mono WASM implementation. There are random `Abort trap: 6` failures while running against the Chakra engine. Previous versions of emscripten have been working and the other engines that we test against work fine. The issue from the Mono repo is here: https://github.com/mono/mono/issues/13195 We have tried to add as much information as we can to the issue.
[WebAssembly] Abort failure - Abort trap: 6
https://api.github.com/repos/chakra-core/ChakraCore/issues/5985/comments
7
2019-03-01T09:13:09Z
2019-03-12T04:49:12Z
https://github.com/chakra-core/ChakraCore/issues/5985
416,007,813
5,985
[ "chakra-core", "ChakraCore" ]
Looks like JSON.parse() may have a problem when reporting a syntax error for strings of 10M or more characters. For example, if json is a long string followed by a comma (invalid character), the following script run in ch.exe should report syntax error, but instead the process seems to crash and nothing is logged after JSON.parse(): ```javascript let desiredLength = 10 * 1000 * 1000; //desiredLength -= 1; const json = `"${'a'.repeat(desiredLength - 3)}",`; // "aaa...aaa", console.log(json.length); JSON.parse(json); console.log('finished'); ``` Output: > 10000000 However, uncommenting line 2 and decreasing `desiredLength` by 1 produces expected result: > 9999999 > SyntaxError: JSON.parse Error: Unexpected input at position:9999999 > at Global code (C:\Temp\cc_windows_1_11_6\x86_release\script.js:8:1) Does JSON.parse use some internal buffer of 10M characters so that exceeding this size causes it to crash? ChakraCore: 1.11.6 x86 release OS: Windows 10 17763.316
JSON.parse() crashes on strings of 10M characters
https://api.github.com/repos/chakra-core/ChakraCore/issues/5975/comments
1
2019-02-27T08:40:41Z
2019-07-10T18:36:45Z
https://github.com/chakra-core/ChakraCore/issues/5975
415,005,492
5,975
[ "chakra-core", "ChakraCore" ]
I discovered an incompatibility in handling of the segmentation fault signal between the ChakraCore engine and CoreCLR. The issue IMO impacts all recent ChakraCore versions. It is triggered by a segmentation fault in user code (e.g. any `NullReferenceException`) in a CoreCLR-driven process and manifests itself as a stack overflow / stack smashing that crashes the process. The following occurs after the ChakraCore engine is loaded into a CoreCLR process when a segmentation fault is triggered: ``` Process is terminating due to StackOverflowException. Aborted (core dumped) ``` The core dump contains the following stack: ``` frame #0: 0x00007ff9a96d7fff libc.so.6`gsignal + 207 frame #1: 0xfffffffe7fffffff frame #2: 0x00007ff9a979e1f7 libc.so.6`__fortify_fail + 55 frame #3: 0x00007ff9a979e1c0 libc.so.6`__stack_chk_fail + 16 frame #4: 0x00007ff44c0e94a2 libChakraCore.so`sigsegv_handler(int, siginfo_t*, void*) + 171 ``` When debugging the crash in _lldb_ we can see a more informative stack: ``` * thread #1, name = 'dotnet', stop reason = signal SIGABRT * frame #0: libc.so.6`__GI_raise(sig=2) at raise.c:51 frame #1: libc.so.6`__GI_abort at abort.c:79 frame #2: 0x00007f7616872e73 libcoreclr.so`PROCAbort + 19 frame #3: 0x00007f761683c262 libcoreclr.so`sigsegv_handler(int, siginfo_t*, void*) + 338 frame #4: 0x00007f760df08187 libclrjit.so`sigsegv_handler(int, siginfo_t*, void*) + 247 frame #5: 0x00007f757571146b libChakraCore.so`sigsegv_handler(int, siginfo_t*, void*) + 171 ``` According to my investigation, the stack overflow is only _virtual_. CoreCLR registers its SIGSEGV handler [with the the `SA_ONSTACK` flag](https://github.com/dotnet/coreclr/blob/75d1d390c1b631eeb99d90f92f0ccdb840367b7d/src/pal/src/exception/signal.cpp#L251) that instruct the kernel to execute the handler on a separate stack. On the other hand, ChakraCore registers its handler [without the flag](https://github.com/Microsoft/ChakraCore/blob/f9a9d43df125835eaf5307b448c215e1e9a12617/pal/src/exception/signal.cpp#L583). The discrepancy is IMO the reason why [the CoreCLR SO detection](https://github.com/dotnet/coreclr/blob/75d1d390c1b631eeb99d90f92f0ccdb840367b7d/src/pal/src/exception/signal.cpp#L467) malfunctions and aborts the process. It seems that the SO detector cannot deal with the fact that the SIGSEGV handler is _not_ executing on the separate stack CoreCLR prepared during PAL initialization. **A small repro project can be downloaded [here](https://github.com/Microsoft/ChakraCore/files/2904622/SegmentationFaultRepro.zip)**. Crashes consistently on Ubuntu 18.04. Once I patched the [registration of the SIGSEGV handler](https://github.com/Microsoft/ChakraCore/blob/f9a9d43df125835eaf5307b448c215e1e9a12617/pal/src/exception/signal.cpp) in ChakraCore (to align it with the CoreCLR version) the crash was gone: ```diff 73c73 < static void handle_signal(int signal_id, SIGFUNC sigfunc, struct sigaction *previousAction); --- > static void handle_signal(int signal_id, SIGFUNC sigfunc, struct sigaction *previousAction, int additionalFlags = 0); 120c120 < handle_signal(SIGSEGV, sigsegv_handler, &g_previous_sigsegv); --- > handle_signal(SIGSEGV, sigsegv_handler, &g_previous_sigsegv, SA_ONSTACK); 579c579 < void handle_signal(int signal_id, SIGFUNC sigfunc, struct sigaction *previousAction) --- > void handle_signal(int signal_id, SIGFUNC sigfunc, struct sigaction *previousAction, int additionalFlags) 583c583 < newAction.sa_flags = SA_RESTART; --- > newAction.sa_flags = SA_RESTART | additionalFlags; 591a592,598 > > #ifdef INJECT_ACTIVATION_SIGNAL > if ((additionalFlags & SA_ONSTACK) != 0) > { > sigaddset(&newAction.sa_mask, INJECT_ACTIVATION_SIGNAL); > } > #endif ``` I don't know whether the issue lies within the CoreCLR SO detector or ChakraCore. Either the handler registration has to be reconciled or the SO detector has to account for the fact that an incompatible SIGSEGV handler may be registered later in the process. The issue has been previously reported as #4893 and #5781. There may be also [another incompatibility](https://github.com/dotnet/diagnostics/issues/122#issuecomment-464617171) between ChakraCore and CoreCLR that prevents analysis of managed core dumps (maybe the ChakraCore PAL is an incompatible copy-paste from CoreCLR?).
Incompatibility in handling of SIGSEGV between ChakraCore and CoreCLR
https://api.github.com/repos/chakra-core/ChakraCore/issues/5973/comments
21
2019-02-26T08:51:31Z
2020-12-05T20:20:18Z
https://github.com/chakra-core/ChakraCore/issues/5973
414,496,022
5,973
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Backend/BackwardPass.cpp:2097. PoC: ``` (function () { var var_0 = Math.floor; for (var_1 = 3; var_1 <= 0x1000; var_1 += 2) { var_0(var_1).var_0; } })(); ``` Commit: 4a18b8a Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Backend/BackwardPass.cpp:2097
https://api.github.com/repos/chakra-core/ChakraCore/issues/5971/comments
0
2019-02-25T00:48:46Z
2019-04-18T20:20:53Z
https://github.com/chakra-core/ChakraCore/issues/5971
413,891,950
5,971
[ "chakra-core", "ChakraCore" ]
Hi, Sadly I can't reproduce the issue in minimal way but the behavior I'm experiencing in edge 44 is that a function prototype is being changed without any triggers from my side. This is the basic idea of the broken setup. I have a factory of functions: ```js function create(value, obj){ ... function inner(){ ... } obj.someField = value /* override function prototype */ Object.setPrototypeOf(inner, obj) return inner } ``` The factory is used to create function instances ```js // usage of the factory const f1 = create('1', {$: true}) const f2 = create('2', {$: true}) // this will be the test subject ``` Then, later on in code, `f2` is being passed as an argument to another function. Here's a simplified version of that one: ```js function test(fn /* passing f2 */){ console.log(fn.someField) // logs 2 const values = ['someField'].map((key)=>fn[key]) // something went wrong here console.log(fn.someField) // logs 1, should log 2 } ``` It appears the second `.someField` lookup (inside the second `console.log`) gets the prototype of `f1` instead of `f2`. Behavior suggests this is a JS engine caching issue for prototype lookup. Same code functions properly in Chrome/FF. I have managed to work around the issue by setting a property on the function itself: ```js function create(value, obj){ ... function inner(){ ... } obj.someField = value /* override function prototype */ Object.setPrototypeOf(inner, obj) inner.workAround = Math.random() return inner } ``` maybe related to #5915
Wrong function prototype lookup after setPrototypeOf
https://api.github.com/repos/chakra-core/ChakraCore/issues/5970/comments
1
2019-02-24T15:41:38Z
2020-03-26T23:01:21Z
https://github.com/chakra-core/ChakraCore/issues/5970
413,834,833
5,970
[ "chakra-core", "ChakraCore" ]
Hi everyone, running this test case, it was observed that Chakra didn't raised a WASM.CompileError due 31 offset. Charka: 1.11.6.0 OS: Linux Mint 19 ```js function module(bytes) { let buffer = new ArrayBuffer(bytes.length); let view = new Uint8Array(buffer); for (let i = 0; i < bytes.length; ++i) { view[i] = bytes.charCodeAt(i); } return new WebAssembly.Module(buffer); } function assert_invalid(bytes) { try { module(bytes) } catch (e) { if (e instanceof WebAssembly.CompileError) return; } throw new Error("Wasm validation failure expected"); } assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x05\x01\x60\x00\x01\x7f\x03\x02\x01\x00\x0a\x0f\x01\x0d\x00\x02\x7f\x02\x40\x00\x0d\x01\x0b\x41\x01\x0b\x0b"); ``` Actual results: pass without failures Expected results: Error: Wasm validation failure expected V8 and SpiderMonkey works as expected. cinfuzz
Wasm should raises a CompileError due 31+ offset
https://api.github.com/repos/chakra-core/ChakraCore/issues/5968/comments
1
2019-02-21T11:01:31Z
2019-06-07T17:56:17Z
https://github.com/chakra-core/ChakraCore/issues/5968
412,866,997
5,968
[ "chakra-core", "ChakraCore" ]
I'm using Microsoft Edge 42.17134.1.0. Following code shows unexpected result with Microsoft Edge. ``` x1 = 0.015; x2 = 0.045; console.log(x1.toFixed(2)); // Edge: 0.02, Chrome: 0.01 console.log(x2.toFixed(2)); // Edge: 0.05, Chrome: 0.04 ``` ECMAScript specification requires that `Number.prototype.toFixed()` must return mathematically closest decimal expression to `x1` and `x2`. The exact value of `x1` is 0.01499999999999999944... and `x2` is 0.0449999999999999983... , so the return value should be `"0.01"` and `"0.04"`;
Number.prototype.toFixed() sometimes rounds to non-closest value
https://api.github.com/repos/chakra-core/ChakraCore/issues/5960/comments
1
2019-02-18T10:11:41Z
2019-02-21T18:48:44Z
https://github.com/chakra-core/ChakraCore/issues/5960
411,397,737
5,960
[ "chakra-core", "ChakraCore" ]
I'm using Microsoft Edge 42.17134.1.0. I noticed some bug in `Number.prototype.toFixed()`. For example, following code shows unexpected result on Microsoft Edge. ```javascript x = 1125899906842623.9; console.log(x.toFixed(2)); // Edge: 1125899906842623.90, Chrome: 1125899906842623.88 ``` Microsoft Edge (and also IE 11) returns `"1125899906842623.90"`. However, Chrome and other browsers return `"1125899906842623.88"`. ECMAScript specification requires that `Number.prototype.toFixed()` must return mathematically closest decimal expression to `x`. The exact value of `x` is `1125899906842623.875`, so the correct return value seems to be `"1125899906842623.88"`.
Number.prototype.toFixed() against big numbers doesn't have enough precision.
https://api.github.com/repos/chakra-core/ChakraCore/issues/5959/comments
1
2019-02-18T08:01:45Z
2019-02-21T18:49:22Z
https://github.com/chakra-core/ChakraCore/issues/5959
411,345,960
5,959
[ "chakra-core", "ChakraCore" ]
``` curl -SL https://aka.ms/chakracore/install | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 100 5290 100 5290 0 0 843 0 0:00:06 0:00:06 --:--:-- 4423 ChakraCore Installation Script 0.1b Visit https://aka.ms/WhatIs/ChakraCore for more information ] Fetching the latest ChakraCore version ] Found ChakraCore 1.11.5 for Linux ---------------------------------------------------------------- This script will download & execute ChakraCore binary located at https://aka.ms/chakracore/cc_linux_x64_1_11_5 ---------------------------------------------------------------- If you don't agree, press Ctrl+C to terminate ] Downloading ChakraCore ] https://aka.ms/chakracore/cc_linux_x64_1_11_5 ] Downloading ChakraCore shasum ] https://aka.ms/chakracore/cc_linux_x64_1_11_5_s ] Download completed ] Extracting the compressed file is failed. ] gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now ```
Install ChakraCore 1.11.5 failed (missing shasum file)
https://api.github.com/repos/chakra-core/ChakraCore/issues/5958/comments
2
2019-02-15T06:31:10Z
2019-02-19T19:17:30Z
https://github.com/chakra-core/ChakraCore/issues/5958
410,624,739
5,958
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Runtime/Library/WasmLibrary.cpp:86. ``` var wasmCode = new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,127,3,2,1,0,5,4,1,1,0,0,7,5,1,1,102,0,0,10,6,1,4,0,0,11,11,0,11,4,110,97,109,101,1,4,1,0,1,102]); var wasmModule = new WebAssembly.Module(wasmCode); var wasmInstance = new WebAssembly.Instance(wasmModule, {}); wasmInstance.exports.f(); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Library/WasmLibrary.cpp:86
https://api.github.com/repos/chakra-core/ChakraCore/issues/5956/comments
0
2019-02-14T20:47:09Z
2019-02-20T22:14:58Z
https://github.com/chakra-core/ChakraCore/issues/5956
410,485,072
5,956
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Backend/NativeCodeGenerator.cpp:957 PoC: ``` function func_0() { var wasmCode = new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,4,1,1,1,1,7,8,1,4,108,111,97,100,0,0,10,9,1,7,0,32,0,40,0,0,11,0,7,1,5,4,108,111,97,100]); var wasmModule = new WebAssembly.Module(wasmCode); for (var var_0 of [0, 12, 192]) { var wasmInstance = new WebAssembly.Instance(wasmModule, { mod: { offset: var_0 } }); for (var var_2 = var_0 - 20; var_2 < var_0 + 20; var_2 += 4) { if (var_2 >= 0) wasmInstance.exports.load(var_2) } } } for(i = 0; i < 0x10000; i ++) func_0(); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Backend/NativeCodeGenerator.cpp:957
https://api.github.com/repos/chakra-core/ChakraCore/issues/5955/comments
0
2019-02-14T20:15:15Z
2019-03-05T23:15:23Z
https://github.com/chakra-core/ChakraCore/issues/5955
410,473,260
5,955
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Runtime/Types/PathTypeHandler.h:493. PoC: ``` var var_0 = { get foo() {}, foo: 2 }; var var_1 = {}; Object.setPrototypeOf(var_0, var_1); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Types/PathTypeHandler.h:493
https://api.github.com/repos/chakra-core/ChakraCore/issues/5954/comments
1
2019-02-14T16:37:50Z
2019-02-28T22:11:32Z
https://github.com/chakra-core/ChakraCore/issues/5954
410,388,374
5,954
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Backend/GlobOpt.cpp:10251. PoC: ``` for (;;){ var_0 = 0; if (var_0) do { } while (false); } ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Backend/GlobOpt.cpp:10251
https://api.github.com/repos/chakra-core/ChakraCore/issues/5953/comments
1
2019-02-14T16:33:40Z
2019-04-05T00:41:18Z
https://github.com/chakra-core/ChakraCore/issues/5953
410,386,542
5,953
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Runtime/Types/PathTypeHandler.cpp:3877. PoC: ``` (function () { function func_0() { } delete func_0.length; Object.defineProperty(Function.prototype, 'length', { writable: true }); func_0.length = 0; }()); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Types/PathTypeHandler.cpp:3877
https://api.github.com/repos/chakra-core/ChakraCore/issues/5952/comments
1
2019-02-14T16:29:33Z
2019-03-04T19:57:31Z
https://github.com/chakra-core/ChakraCore/issues/5952
410,384,583
5,952
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Runtime/./Language/InlineCache.h:471. PoC: ``` JSON.stringify({}, [0]); JSON.stringify({0: {}}, [0]); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Language/InlineCache.h:471
https://api.github.com/repos/chakra-core/ChakraCore/issues/5951/comments
0
2019-02-14T16:21:21Z
2019-03-11T22:46:25Z
https://github.com/chakra-core/ChakraCore/issues/5951
410,380,627
5,951
[ "chakra-core", "ChakraCore" ]
The debug build crashes due to assertion failure at lib/Backend/BackwardPass.cpp:2673 PoC: ``` (function () { while (!(arguments !== arguments)); })(); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Backend/BackwardPass.cpp:2673
https://api.github.com/repos/chakra-core/ChakraCore/issues/5950/comments
0
2019-02-14T16:11:39Z
2019-04-16T00:20:43Z
https://github.com/chakra-core/ChakraCore/issues/5950
410,375,957
5,950
[ "chakra-core", "ChakraCore" ]
The debug build fails with assertion failure at lib/Runtime/Library/JavascriptPromise.cpp:648 PoC: ``` var var_0 = new Promise(function () {}); var var_1 = function () {}; var_0.then = function (a, b) { var_2 = b; }; var_3 = Promise.prototype.finally.call(var_0, var_1); new var_2([]).var_3(); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Library/JavascriptPromise.cpp:648
https://api.github.com/repos/chakra-core/ChakraCore/issues/5949/comments
0
2019-02-14T16:07:56Z
2019-03-12T00:15:14Z
https://github.com/chakra-core/ChakraCore/issues/5949
410,374,123
5,949
[ "chakra-core", "ChakraCore" ]
The debug build of ChakraCore crashes with assertion failure. PoC: ``` (function () { function func_0() { } func_0.prototype = { foo() { super.a = ''; } }; var var_0 = new func_0(); Object.defineProperty(var_0, 'a', {}); var_0.foo(); }()); ``` Commit: e055dbb Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion failure at lib/Runtime/Language/CacheOperators.inl:367
https://api.github.com/repos/chakra-core/ChakraCore/issues/5948/comments
1
2019-02-14T15:52:36Z
2019-06-24T19:50:03Z
https://github.com/chakra-core/ChakraCore/issues/5948
410,366,565
5,948
[ "chakra-core", "ChakraCore" ]
Chakra failed with lots of errors when build with permissive- by msvc on Windows, I use latest source version c95f834 on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior. **You can repro this issue as the steps below:** 1. git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src 2. open a clean x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src 3. set CL=/permissive- /d1ParseTrees:identErrors- 4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.17134.0 Build\Chakra.Core.sln /t:Rebuild **Failures:** D:\Chakra\src\lib\SCACore\SCADeserialization.h(53,36): error C2760: syntax error: unexpected token '<', expected 'declaration' typedef TypedArrayTrace<T,clamped> trace_type; ^ D:\Chakra\src\lib\SCACore\SCADeserialization.h(53,36): note: This diagnostic occurred in the compiler generated function 'void Js::DeserializationCloner<Reader>::ReadTypedArray(TDst *) const' typedef TypedArrayTrace<T,clamped> trace_type; ^ D:\Chakra\src\lib\SCACore\SCADeserialization.h(162): note: see reference to class template instantiation 'Js::DeserializationCloner<Reader>' being compiled }; D:\Chakra\src\lib\SCACore\SCASerialization.h(47,36): error C2760: syntax error: unexpected token '<', expected 'declaration' typedef TypedArrayTrace<T, clamped, isVirtual> trace_type; ^ D:\Chakra\src\lib\SCACore\SCASerialization.h(47,36): note: This diagnostic occurred in the compiler generated function 'void Js::SerializationCloner<Writer>::WriteTypedArray(TSrc) const' typedef TypedArrayTrace<T, clamped, isVirtual> trace_type; ^ D:\Chakra\src\lib\SCACore\SCASerialization.h(187): note: see reference to class template instantiation 'Js::SerializationCloner<Writer>' being compiled };
Chakra failed when build with permissive- by msvc on Windows
https://api.github.com/repos/chakra-core/ChakraCore/issues/5947/comments
1
2019-02-14T10:07:14Z
2019-03-02T01:32:00Z
https://github.com/chakra-core/ChakraCore/issues/5947
410,221,299
5,947
[ "chakra-core", "ChakraCore" ]
[jsvu](https://github.com/GoogleChromeLabs/jsvu) relies on the binaries being mentioned in the release notes with the specific format, the latest 1.11.6 doesn't have them at all. Compare 1.11.6: https://github.com/Microsoft/ChakraCore/releases/tag/v1.11.6 To 1.11.5: https://github.com/Microsoft/ChakraCore/releases/tag/v1.11.5 /cc @liminzhu @MikeHolman
Release notes for ChakraCore 1.11.6 don't contain binaries, breaking jsvu
https://api.github.com/repos/chakra-core/ChakraCore/issues/5945/comments
11
2019-02-13T20:31:21Z
2019-02-19T19:31:06Z
https://github.com/chakra-core/ChakraCore/issues/5945
409,988,151
5,945
[ "chakra-core", "ChakraCore" ]
The release build of ChakraCore crashes due to null dereferencing. PoC: ``` function func_0() { try { var var_0 = arguments; throw new Error(); } catch (undefined) { func_0(typeof var_0 === 1); } } func_0(); ``` Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
ChakraCore crashes due to another null dereference
https://api.github.com/repos/chakra-core/ChakraCore/issues/5944/comments
2
2019-02-13T13:12:33Z
2019-06-07T18:23:08Z
https://github.com/chakra-core/ChakraCore/issues/5944
409,798,590
5,944
[ "chakra-core", "ChakraCore" ]
Debug build of ChakraCore crashes due to assertion failure at bin/ch/Debugger.cpp:412 PoC: ``` function func_0() { (function () { eval(''); }()); function func_2() { return func_0(); } func_2(); } WScript.Attach(func_0); ``` Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion Failure at bin/ch/Debugger.cpp:412
https://api.github.com/repos/chakra-core/ChakraCore/issues/5943/comments
1
2019-02-13T12:48:47Z
2019-02-21T18:52:18Z
https://github.com/chakra-core/ChakraCore/issues/5943
409,789,271
5,943
[ "chakra-core", "ChakraCore" ]
Debug build of ChakraCore crashes due to assertion failure at lib/Runtime/./Base/Utf8SourceInfo.h:61. PoC: ``` function func_0() { 'use asm'; } WScript.Attach(func_0); ``` Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
Assertion Failure at lib/Runtime/Base/Utf8SourceInfo.h:61
https://api.github.com/repos/chakra-core/ChakraCore/issues/5942/comments
3
2019-02-13T11:57:35Z
2019-03-11T19:18:41Z
https://github.com/chakra-core/ChakraCore/issues/5942
409,769,915
5,942
[ "chakra-core", "ChakraCore" ]
Both release and debug build of ChakraCore crashes due to the null dereferencing. PoC: ``` function func_0(f) { (function (r) { WScript.Attach(r); }(f)); } async function func_1(notAttachCall) { if (notAttachCall) { for (let var_0 = 0; var_0 < 1; ++var_0) { await func_0(func_1); } } else { const var_1 = 0; } } func_1(true); ``` Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
ChakraCore crashes due to null dereference
https://api.github.com/repos/chakra-core/ChakraCore/issues/5941/comments
1
2019-02-13T10:44:44Z
2019-02-21T18:50:38Z
https://github.com/chakra-core/ChakraCore/issues/5941
409,740,003
5,941
[ "chakra-core", "ChakraCore" ]
Given the extremely simple (albeit contrived) script: `var arr=[];for(var i=0;i<1000000000;i++) arr.push(i);` This will apparently crash the process that is executing it. I did not see any obvious way in the API to prevent this, however. Am I overlooking something, is this a shortcoming in the current API, or is this actually intended?
Is there a way to stop a js script from crashing the application?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5921/comments
7
2019-01-26T15:37:34Z
2020-03-26T22:52:04Z
https://github.com/chakra-core/ChakraCore/issues/5921
403,452,788
5,921
[ "chakra-core", "ChakraCore" ]
Hey there! I authored / maintain a web framework (https://derbyjs.com/). We use `Object.setPrototypeOf()` in a manner similar to how Node.js `util.inherits()` is implemented. This pattern is also demonstrated in the MDN docs for `Object.setPrototypeOf()`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf. We discovered an issue where an `instanceof` check returns the incorrect result in IE 11, Edge, and Node Chakra only. In our code, this leads to an error being thrown in a case where the instanceof check is supposed to guard against the prototype chain being appended to twice. Here is a simplified repro case that demonstrates the issue: ``` javascript // class Component {} function Component() {} function isBasePrototype(object) { return (object === Function.prototype) || (object === Object.prototype) || (object === null); } function getRootPrototype(object) { while (true) { var prototype = Object.getPrototypeOf(object); if (isBasePrototype(prototype)) return object; object = prototype; } } function extendComponent(klass) { console.log('extendComponent: klass.prototype instanceof Component', klass.prototype instanceof Component); console.log('extendComponent: Box.prototype instanceof Component', Box.prototype instanceof Component); // Don't do anything if the constructor already extends Component if (klass.prototype instanceof Component) return; // Find the end of the prototype chain var rootPrototype = getRootPrototype(klass.prototype); // Establish inheritance with the pattern that Node's util.inherits() uses // if Object.setPrototypeOf() is available (all modern browsers & IE11). // This inhertance pattern is not equivalent to class extends, but it does // work to make instances of the constructor inherit the desired prototype // https://github.com/nodejs/node/issues/4179 Object.setPrototypeOf(rootPrototype, Component.prototype); } // class Shape {} // class Box extends Shape {} function Shape() {} function Box() {} Box.prototype = Object.create(Shape.prototype); Box.prototype.constructor = Box; console.log('before extend: Box.prototype instanceof Component', Box.prototype instanceof Component); extendComponent(Box); console.log('after extend 1: Box.prototype instanceof Component', Box.prototype instanceof Component); extendComponent(Box); console.log('after extend 2: Box.prototype instanceof Component', Box.prototype instanceof Component); ``` In Chrome, Firefox, and Safari, we get the correct output: ![screen shot 2019-01-18 at 10 06 31 am](https://user-images.githubusercontent.com/232244/51404665-f3791d80-1b08-11e9-9b2a-f6c93ab85100.png) IE11, Edge, and Node Chakra fail: ![screen shot 2019-01-18 at 10 06 06 am](https://user-images.githubusercontent.com/232244/51404672-f8d66800-1b08-11e9-8267-478a480e83bc.png) Some observations: * The same problem occurs both with ES5 class-like function constructors as well as ES6 classes. * The instanceof outside of the function returns the correct value `true` and then instanceof within the function returns the incorrect value `false` * This occurs when setting the prototype of the prototype of a class, but if Box doesn't inherit from any other classes, this issue does not occur. For now, we're going to work around this issue with some extra checks in the code, but I'm pretty sure this is a bug in Chakra. Please let me know if you determine otherwise. Best, Nate
instanceof returns incorrect result within function after prototype chain has been extended with Object.setPrototypeOf()
https://api.github.com/repos/chakra-core/ChakraCore/issues/5915/comments
6
2019-01-18T17:47:09Z
2022-10-18T15:52:52Z
https://github.com/chakra-core/ChakraCore/issues/5915
400,825,860
5,915
[ "chakra-core", "ChakraCore" ]
``` arr = new Float64Array([NaN]); arr = new Uint8ClampedArray(arr.buffer); // output: // ch bug.js: arr = [0,0,0,0,0,0,248,255] // ch -NoNative bug.js: arr = [0,0,0,0,0,0,248,255] arr = new Float64Array([-NaN]); arr = new Uint8ClampedArray(arr.buffer); // output: // ch bug.js: arr = [0,0,0,0,0,0,248,255] // ch -NoNative bug.js: arr = [0,0,0,0,0,0,248,127] ``` NaN is represented by a float using the IEEE 754 floating point representation. When representing NaN, IEEE 754 uses the most significant bit as the sign bit. So NaN in IEEE 754 is represented by: s111 1111 1111 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx S = sign xxx... = anything but all zeros This explains the diff in outputs: new Uint8ClampedArray(arr.buffer); is taking the raw NaN value and putting it into an array where each index stores an 8 bit value (the transfer is done using Big-endian). The sign bit is apparent in the 7th index of arr: 255 means the sign bit is 1 (negative) and 127 means the sign bit is 0 (positive)
The negative NaN's sign bit is inconsistent when running -NoNative
https://api.github.com/repos/chakra-core/ChakraCore/issues/5906/comments
0
2019-01-10T01:07:49Z
2019-01-29T01:14:49Z
https://github.com/chakra-core/ChakraCore/issues/5906
397,630,983
5,906
[ "chakra-core", "ChakraCore" ]
Fresh clone of https://github.com/Microsoft/ChakraCore.git. Using Visual Studio 2017 Community with Visual C++ on Windows 10 Pro x64 (1809) Open project Set target to x64 138 build errors ("unknown attribute 'guard'", etc). Entire output attached. [build log errors.txt](https://github.com/Microsoft/ChakraCore/files/2743070/build.log.errors.txt)
Can't build on Visual Studio 2017 Community with Visual C++ 2017
https://api.github.com/repos/chakra-core/ChakraCore/issues/5904/comments
3
2019-01-10T00:11:14Z
2019-04-08T17:31:02Z
https://github.com/chakra-core/ChakraCore/issues/5904
397,619,336
5,904
[ "chakra-core", "ChakraCore" ]
[jsvu](https://github.com/GoogleChromeLabs/jsvu) downloads ChakraCore from GitHub releases and uses the checksum embedded in the tag to verify the download. It appears they're expecting the checksum string to be lowercase `a-f` in their regex: https://github.com/GoogleChromeLabs/jsvu/blob/5da9253b29b813f1799368432cd4dfee2f3c46f7/engines/chakra/get-checksums.js#L21 The latest 1.11.5 release however used uppercase chars in the checksum: https://github.com/Microsoft/ChakraCore/releases/tag/v1.11.5 ~~@rajatd would it be possible to modify the strings to be lowercase?~~ Not needed anymore now that jsvu put in a workaround.
ChakraCore 1.11.5 download broken on jsvu due to uppercase checksum
https://api.github.com/repos/chakra-core/ChakraCore/issues/5902/comments
2
2019-01-09T13:25:51Z
2019-01-14T18:37:32Z
https://github.com/chakra-core/ChakraCore/issues/5902
397,370,111
5,902
[ "chakra-core", "ChakraCore" ]
To reproduce, release `arg1Info` and `arg2Info` in `WasmBytecodeGenerator::EmitV8X16Shuffle`: ``` ReleaseLocation(&arg2Info); ReleaseLocation(&arg1Info); ``` This leads to `tests/wasm.simd/mathTests.js` to hit "Unitialized reg" assertion: ``` Function: func_i8x16_shuffle_test1[1] ( (#-1.1), #9) Reg: s35 ASSERTION 23964: (c:\users\ppenzin\dev\chakracore\lib\backend\sccliveness.cpp, line 570) Uninitialized reg? Failure: ((0)) FATAL ERROR: ch.exe failed due to exception code c0000420 ``` Smaller reproducer is as follows: ``` $ cat min.wat (module (import "dummy" "memory" (memory 1)) (func (export "func_i8x16_shuffle_test1") (v128.store align=4 (i32.const 0) (v8x16.shuffle 0x13121110 0x17161514 0x03020100 0x07060504 (v128.load offset=0 align=4 (i32.const 0)) (v128.load offset=0 align=4 (i32.const 16)) ) ) ) ) $ cat mathMin.js let passed = true; function assertEquals(expected, actual) { if (expected != actual) { passed = false; throw `Expected ${expected}, received ${actual}`; } } const INITIAL_SIZE = 1; const memObj = new WebAssembly.Memory({initial:INITIAL_SIZE}); const module = new WebAssembly.Module(readbuffer('min.wasm')); const instance = new WebAssembly.Instance(module, { "dummy" : { "memory" : memObj } }).exports; const arrays = { "i32x4" : new Int32Array (memObj.buffer), "i16x8" : new Int16Array (memObj.buffer), "i8x16" : new Int8Array (memObj.buffer), "f32x4" : new Float32Array (memObj.buffer), "f64x2" : new Float64Array (memObj.buffer), "i64x2" : new Int32Array (memObj.buffer) }; function moveArgsIntoArray(args, offset, arr) { for (let i = 0; i < args.length; i++) { arr[offset + i] = args[i]; } } let testMathOps = function (funcname, args1, args2, resultArr) { const len = args1.length; const type = funcname.split('_')[1]; const arr = arrays[type]; moveArgsIntoArray(args1, 0, arr); if (Array.isArray(args2)) { //binary ops moveArgsIntoArray(args2, len, arr); instance[funcname](); } else if (Number.isInteger(args2)) { instance[funcname](args2); //shift amount for shl/shr } else { instance[funcname](); //unary ops } for (let i = 0; i < resultArr.length; i++) { if ((type === "f32x4" || type === "f64x2") && Number.isNaN(resultArr[i])) { assertEquals(true, Number.isNaN(arr[i])); } else { assertEquals(resultArr[i], arr[i]); } } } //shuffle testMathOps("func_i8x16_shuffle_test1", [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15], [16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31], [16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7] ); if (passed) { print("Passed"); } $ wat2wasm --enable-simd min.wat -o min.wasm $ ch.exe -wasmsimd -forcenative mathMin.js Function: func_i8x16_shuffle_test1[0] ( (#-1.0), #5) Reg: s27 ASSERTION 35416: (c:\users\ppenzin\dev\chakracore\lib\backend\sccliveness.cpp, line 570) Uninitialized reg? Failure: ((0)) FATAL ERROR: ch.exe failed due to exception code c0000420 ```
Releasing arguments in EmitV8X16Shuffle triggers a crash
https://api.github.com/repos/chakra-core/ChakraCore/issues/5898/comments
3
2019-01-08T18:24:42Z
2019-01-28T21:37:17Z
https://github.com/chakra-core/ChakraCore/issues/5898
397,028,669
5,898
[ "chakra-core", "ChakraCore" ]
Is it possible to handle the "Out of memory" error gracefully without having the process killed immediately? For example, when running out of stack space the "Out of stack space" exception is thrown, but it looks like when running out of memory the process crashes immediately. Is this expected? Can anything be done to have ChakraCore throw an exception that the host can handle? I'm testing this by setting JsSetRuntimeMemoryLimit to a low value and running a script like this: ``` function main() { var a = []; a['1000000000'] = 1; var s = a.toString(); } ```
Handling out of memory error
https://api.github.com/repos/chakra-core/ChakraCore/issues/5892/comments
2
2018-12-27T23:39:02Z
2018-12-28T00:12:39Z
https://github.com/chakra-core/ChakraCore/issues/5892
394,510,749
5,892
[ "chakra-core", "ChakraCore" ]
Release build of ChakraCore crashes due to the null dereferencing after the commit 34b8876ec. The input JavaScript is as follows. ``` ({a: b => []} = [2]); ``` $ file ch ch: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped Build Option: None OS: Ubuntu 18.04.1 LTS Arch: x86_64
ChakraCore crashes in lib/Parser/Parse.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/5891/comments
1
2018-12-27T17:22:24Z
2019-03-12T20:07:03Z
https://github.com/chakra-core/ChakraCore/issues/5891
394,448,482
5,891
[ "chakra-core", "ChakraCore" ]
When the right hand side of an `instanceof` expression is a bound function, then a `[Symbol.hasInstance]` property set on the original function doesn't seem to be looked up as expected. This is the test code I'm running: ```js class A { static [Symbol.hasInstance]() { console.log(this.name); } } const B = A.bind(); ({} instanceof B); ``` Here the last line should call `[Symbol.hasInstance]` on type A and print "A", but it doesn't. Apparently, the issue is specific to ChakraCore since other engines behave as expected.
instanceof with bound function should call [Symbol.hasInstance]
https://api.github.com/repos/chakra-core/ChakraCore/issues/5883/comments
2
2018-12-19T05:36:14Z
2019-05-21T20:30:03Z
https://github.com/chakra-core/ChakraCore/issues/5883
392,447,854
5,883
[ "chakra-core", "ChakraCore" ]
Pulling this issue out of @fatcerberus comments in #5875 if you try to use dynamic import with Jsrt and set a FetchImportedModuleCallback BUT do not set a FetchImportedModuleFromScriptCallback using dynamic import in a script will trigger a nullptr de-ref. **Proof of concept:** ```c #include "ChakraCore.h" #include <string.h> void ModuleCallback() {} int main() { JsRuntimeHandle runtime; JsContextRef context; JsValueRef result; // Initialize CC JsCreateRuntime(JsRuntimeAttributeEnableExperimentalFeatures, NULL, &runtime); JsCreateContext(runtime, &context); JsSetCurrentContext(context); // set FetchImportedModuleCallback JsModuleRecord requestModule = JS_INVALID_REFERENCE; JsInitializeModuleRecord(NULL, NULL, &requestModule); JsSetModuleHostInfo(requestModule, JsModuleHostInfo_FetchImportedModuleCallback, ModuleCallback); // script with dynamic import const char* script = "import('bang.js');"; JsValueRef fname; JsCreateString("sample", strlen("sample"), &fname); JsValueRef scriptSource; JsCreateExternalArrayBuffer((void*)script, (unsigned int)strlen(script),NULL, NULL, &scriptSource); // Run the script. JsRun(scriptSource, 0, fname, JsParseScriptAttributeNone, &result); // BANG return 0; } ``` **Analysis of error:** Relevant code is here: https://github.com/Microsoft/ChakraCore/blob/8527dc23954bdf77b17d25e472857f58a3b03f8a/lib/Jsrt/Core/JsrtContextCore.cpp#L105-L142 There is a check on line 126 for if you've failed to set a fetchImportedModuleCallback and an error code is then returned BUT there is no check for failing to set a fetchImportedModuleFromScriptCallback so you can hit nullptr deference instead. I'd like to fix this but I will need to work out how to implement a native test first.
Jsrt nullptr de-ref instead of error code
https://api.github.com/repos/chakra-core/ChakraCore/issues/5880/comments
1
2018-12-17T13:16:35Z
2024-05-16T22:11:17Z
https://github.com/chakra-core/ChakraCore/issues/5880
391,707,361
5,880
[ "chakra-core", "ChakraCore" ]
I assume this is a point that is known internally - but it wasn't in the issue log on Github. Currently Generator functions and async functions are always run only in the interpreter. There is a flag -Jites6Generators to enable jitting them - but using this always results in a crash in the Jit - it encounters an unallocated register the first time it tries to Jit a ResumeYield op. src10pnd is set to a nullptr by this and it goes wrong from there: https://github.com/Microsoft/ChakraCore/blob/8527dc23954bdf77b17d25e472857f58a3b03f8a/lib/Backend/IRBuilder.cpp#L1875 I stumbled upon this whilst working on #5834 there are a few TODOs and equivalent notes in comments about this all dating back to the initial GitHub commit 3 years ago. I've tried to investigate how to fix this but I'm a bit out of my depth in the Jit code.
Generators and Async functions are not jitted
https://api.github.com/repos/chakra-core/ChakraCore/issues/5877/comments
3
2018-12-15T16:48:52Z
2021-03-25T04:30:52Z
https://github.com/chakra-core/ChakraCore/issues/5877
391,393,571
5,877
[ "chakra-core", "ChakraCore" ]
I couldn't find the answer to this in the wiki or docs if it is there I'm sorry for missing it. If I run a debug build of ChakraCore on macOS it produces a lot of logging that is rarely of use to me, below is a sample but one run of ch from a debug build with any script at all produces about 5 times this amount : ``` ] Init /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:59Expression: InternalGetCurrentThread() == pthrCurrent ] SetSignalCount /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:563Expression: InternalGetCurrentThread() == m_pthrOwner ] ReleaseController /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:742Expression: InternalGetCurrentThread() == m_pthrOwner ] Release /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:100Expression: InternalGetCurrentThread() == m_pthrOwner ] Init /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:59Expression: InternalGetCurrentThread() == pthrCurrent ] Init /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:59Expression: InternalGetCurrentThread() == pthrCurrent ] CanThreadWaitWithoutBlocking /Users/snip/Documents/ChakraCore/pal/src/synchmgr/synchcontrollers.cpp:153Expression: InternalGetCurrentThread() == m_pthrOwner ``` Additionally if I run the test suite with a debug build it produces all of this logging - which causes every single test to fail as the logging is not in the baselines. Please could someone tell me how to disable this so I can: - ensure any new code I've written doesn't hit asserts whilst passing tests in the test suite - use tracing or dump features without this noise - debug CC without this noise
Question: running debug builds on xplat without logging?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5876/comments
6
2018-12-14T00:37:16Z
2020-04-19T06:19:52Z
https://github.com/chakra-core/ChakraCore/issues/5876
390,919,130
5,876
[ "chakra-core", "ChakraCore" ]
```cc JsSetModuleHostInfo( _In_ JsModuleRecord requestModule, _In_ JsModuleHostInfoKind moduleHostInfo, _In_ void* hostInfo) ``` **Currently JsSetModuleHostInfo is used for two fundamentally different types of thing** 1. It is used to set properties relating to an individual module, when setting any of these it is set onto the module record you pass in - these can be: i. an URL ii. host defined info iii. an exception 1. It is also used to setup the callbacks for module loading - these are set onto the script context (though the api uses GetScriptContext from the module record to know which context) these are: i. FetchImportedModuleCallback (used for child modules AND dynamic import from a module) ii. FetchImportedModuleFromScriptCallback (used for dynamic import from a script) iii. NotifyModuleReadyCallback (used to say a module is ready to execute) **There are a few issues with this:** 1. It creates a potential for confusion - e.g. as the callbacks you set are actually set on the scriptContext but you're specifying a moduleRecord to set them on a user may think they need to set them each time they make a moduleRecord (which they don't) AND worse a user may think they can use a different callback for a different module in the same context - the latter one will override the first one and produce unexpected behaviour. 1. If an embedder wishes to setup dynamic import from scripts they have to create a throwaway module record to enable them to set the callbacks in advance. 1. If an embedder wishes to support only static import they either need a throwaway module record to set the callbacks in advance or they need to set them on their main entry point module OR they may (as ch actually does) unnecessarily set them every time a module record is created. **Suggestion:** 1. Leave this API functioning as is so as not to break any existing implementations that use it. 1. Add a new additional API for setting the callbacks e.g. `JsSetModuleCallbacks` that takes the callback parameters and either also takes a JsContext parameter or internally uses GetCurrentContext. This api would therefore not require a moduleRecord parameter. 1. Update documentation to reccomend the use of this new api for setting callbacks and suggest JsSetModuleHostInfo just for the module specific info (URL, HostDefinedInfo and loading Exceptions) **Note:** As usual with any suggestion I make: If wanted I will open a PR to implement the suggestion.
Suggestion: Module API divide JsSetModuleHostInfo
https://api.github.com/repos/chakra-core/ChakraCore/issues/5875/comments
7
2018-12-13T22:41:31Z
2018-12-19T20:30:57Z
https://github.com/chakra-core/ChakraCore/issues/5875
390,892,290
5,875
[ "chakra-core", "ChakraCore" ]
`JsCreateTypedArray` has the following signature in ChakraCore.h: ```c CHAKRA_API JsCreateTypedArray( _In_ JsTypedArrayType arrayType, _In_ JsValueRef baseArray, _In_ unsigned int byteOffset, _In_ unsigned int elementLength, _Out_ JsValueRef *result); ``` However, according to the documentation comment just above that, baseArray can legally be `JS_INVALID_REFERENCE` (equivalent to NULL), in which case it creates the backing store on the fly: ``` The base array of the new array. Use <c>JS_INVALID_REFERENCE</c> if no base array. ``` Therefore the annotation for `baseArray` should be `_In_opt_`, not `_In_`. There are probably more like this, but this happened to be one I noticed.
JsCreateTypedArray has wrong SAL annotation
https://api.github.com/repos/chakra-core/ChakraCore/issues/5872/comments
4
2018-12-13T06:21:16Z
2018-12-13T23:15:22Z
https://github.com/chakra-core/ChakraCore/issues/5872
390,534,390
5,872
[ "chakra-core", "ChakraCore" ]
Hello Friends of ChakraCore, Yesterday, Microsoft Edge announced its intent to adopt the Chromium open source project in the development of desktop Microsoft Edge to create better web compatibility and less fragmentation for web developers and customers. You can read the [announcement blog](https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration/#IIycUFupVTBcbAY5.97) for more information. We’ve seen your questions for ChakraCore and we want to be transparent and honest with the open-source community that has given us so much support. To be compatible with the rest of the platform and reduce interoperability risks, Microsoft Edge will use the V8 engine as part of this change. There is much to build and learn, but we’re excited to take part in the V8 community and start contributing to the project. ChakraCore is currently being used in various projects outside the browser. So, despite the change of direction for Microsoft Edge, our team will continue supporting ChakraCore. We will ensure that any security vulnerability is patched in a timely manner, apart from bringing other enhancements to the engine. The project will also continue taking public contributions. As the team learns from the move to support and contribute to Chromium and V8, we’ll keep the community informed about our progress and adjustments, if any, that we’ll need to make. ChakraCore team
Chromium adoption in Microsoft Edge and future of ChakraCore
https://api.github.com/repos/chakra-core/ChakraCore/issues/5865/comments
44
2018-12-07T17:59:34Z
2020-03-09T18:10:45Z
https://github.com/chakra-core/ChakraCore/issues/5865
388,756,166
5,865
[ "chakra-core", "ChakraCore" ]
What is the future of chakracore if edge moves to chromium
What is the future of chakracore if edge moves to chromium
https://api.github.com/repos/chakra-core/ChakraCore/issues/5864/comments
2
2018-12-07T14:50:43Z
2018-12-07T18:03:06Z
https://github.com/chakra-core/ChakraCore/issues/5864
388,685,173
5,864
[ "chakra-core", "ChakraCore" ]
When we use --asmDumpMode or --dump:assembly, dumps of multiple functions are mixed (only tested in Linux), making it hard to read.
BUG: dumps of multiple functions are mixed in --asmDumpMode or --dump:assembly
https://api.github.com/repos/chakra-core/ChakraCore/issues/5863/comments
3
2018-12-07T04:29:34Z
2018-12-07T11:56:38Z
https://github.com/chakra-core/ChakraCore/issues/5863
388,501,692
5,863
[ "chakra-core", "ChakraCore" ]
Per https://tc39.github.io/ecma262/#sec-getiterator GetIterator should cache the next() method for the iterator in an internal slot so `get` is not used on it for each iteration. There are a few test262 cases that this issue causes to fail, e.g. https://github.com/tc39/test262/blob/master/test/language/statements/for-of/iterator-next-reference.js I'd like to fix this BUT: 1. it will involve messing with some of the same code I'm editing in #5834 1. it feels sufficiently different that it should be a different PR So ideally would like to leave it until my async-generator piece is done (or scrapped) For a simple POC of the issue see below: ```js let calls = 0; const iter = { [Symbol.iterator]() { return { get next() { print ("CALLED GETTER"); return function () {return {done : calls++ > 10 }} } } } } print ("POC 1 - for...of") let i = 0; for (let bar of iter) { if (++i > 2 ) { break; } } print ("POC 2 - yield*") function* genFun() { yield * iter; } const gen = genFun(); gen.next(); gen.next(); print ("POC 3 - ...") const boo = [...iter] ``` With eshost: ``` #### JavaScriptCore, SpiderMonkey, V8 --harmony POC 1 - for...of CALLED GETTER POC 2 - yield* CALLED GETTER POC 3 - ... CALLED GETTER #### Chakra POC 1 - for...of CALLED GETTER CALLED GETTER CALLED GETTER POC 2 - yield* CALLED GETTER CALLED GETTER POC 3 - ... CALLED GETTER CALLED GETTER CALLED GETTER CALLED GETTER CALLED GETTER CALLED GETTER CALLED GETTER ```
BUG: GetIterator should cache next method
https://api.github.com/repos/chakra-core/ChakraCore/issues/5860/comments
1
2018-12-05T23:45:25Z
2020-12-12T15:21:35Z
https://github.com/chakra-core/ChakraCore/issues/5860
387,995,133
5,860
[ "chakra-core", "ChakraCore" ]
Apologies for the bare-faced question here. Over at [Apache CouchDB](https://github.com/apache/couchdb), we're prototyping replacements for our aging and rickety SpiderMonkey 1.8.5 JS engine. Based on the good work done by the Microsoft team on ChakraCore, and knowing it's embedded in products like CosmosDB, we felt this would be a good way forward for our team. By now I'm sure you've [read the rumors](https://www.windowscentral.com/microsoft-building-chromium-powered-web-browser-windows-10), or the layoffs of some of our (mutual!) friends just a few months ago who worked on Edge. They tell us they are bound by NDAs over their dismissals, but now with the WindowsCentral article, we feel the writing is on the wall. [**ETA**: the announcement [is now official](https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration/).] In the interest of ensuring we don't unnecessarily bind ourselves to a dying project, should we [continue our work to bind Erlang to ChakraCore](https://github.com/cloudant-labs/erlang-chakracore) without fear? Or would it be best for us to start over with V8 at this point? We know that you're probably not able to say anything, either, but the question bears asking. Ideally, a statement from someone in leadership that ChakraCore isn't also on the chopping block would go some way to assuring us we've made a good decision. ~~We recognize that you'd have to acknowledge the other rumour first, though.~~ Once again, thanks to the entire ChakraCore team for building an engine that embeds easily and has the features we need. :crossed_fingers: We very much appreciate your work!
[Question] Future of ChakraCore?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5857/comments
7
2018-12-05T16:51:41Z
2019-02-11T22:47:13Z
https://github.com/chakra-core/ChakraCore/issues/5857
387,849,418
5,857
[ "chakra-core", "ChakraCore" ]
In Microsoft Edge (as of Edge 42.17134.1.0), if attempting to add the same Symbol as a key multiple times to an ES6 Map (via `set`), and IF AND ONLY IF that Symbol was obtained from its usage as one of a Object's keys (via `Object.getOwnPropertySymbols`), there is about a 70% chance that the Map will allow the second usage of the same key. The mere fact that a given Symbol is somewhere used as one of an Object's keys does not cause the issue. The problem only seems to occur when getting the references to the Symbol from `Object.getOwnPropertySymbols`. The issue doesn't always occur, but it is frequent. Perhaps it is a race condition. My 70% occurrence estimation is a rough feeling, not based on actual measurement. I suspect that something in Edge's implementation of the Map's `set` function doesn't correctly check equality on Object keys when they are Symbols. No other parts appear to be affected. Referencial Equality is maintained between all appropriate Symbol references after getting the duplicate keys back out of the Map, so it doesn't appear that Edge is somehow creating a new reference when using a Symbol as an Object key. Here is a minimal set of test cases showing the issue, where it fails, and where it does not: https://jsfiddle.net/s0qpdmyw/1/
Duplicate Symbol Keys in ES6 Map Possible (Sometimes, Randomly) if the Symbol was Obtained From Object.getOwnPropertySymbols
https://api.github.com/repos/chakra-core/ChakraCore/issues/5852/comments
8
2018-11-28T23:50:22Z
2018-12-02T19:38:02Z
https://github.com/chakra-core/ChakraCore/issues/5852
385,507,020
5,852
[ "chakra-core", "ChakraCore" ]
Customer using Azure blob store storage complained about csv file upload/download in edge. Repro: Upload a csv file to blob store. Download the file. Other browsers correctly downloads csv file. Edge adds .xls extension and unable to open the file. Found the issue mentioned public forum as well - https://answers.microsoft.com/en-us/edge/forum/edge_extension-edge_win10/edge-browser-changes-file-extension-while-saving/8f32e8a8-1f3a-4fad-a640-788e77f7425e
Edge download .csv file as .xls (adds xls extension)
https://api.github.com/repos/chakra-core/ChakraCore/issues/5850/comments
2
2018-11-28T00:50:32Z
2018-11-30T00:27:32Z
https://github.com/chakra-core/ChakraCore/issues/5850
385,052,267
5,850
[ "chakra-core", "ChakraCore" ]
Calling .slice() (or .substring()) on a string created by date.prototype.toLocaleString() returns unexpected results in Edge. Repro: ```javascript var date = new Date(2018, 11, 20) var str = date.toLocaleString("en-GB") console.log(str); console.log(str.slice(0, 10)); var str2 = '20/12/2018, 00:00:00' console.log(str2) console.log(str2.slice(0, 10)) ``` Expect console to output: ``` 20/12/2018, 00:00:00 20/12/2018 20/12/2018, 00:00:00 20/12/2018 ``` Edge produces: ``` 20/12/2018, 00:00:00 20/12/ 20/12/2018, 00:00:00 20/12/2018 ``` Firefox + Chrome work as expected, untested in IE.
date.prototype.toLocaleString() return value contains U+200E chars with each date part
https://api.github.com/repos/chakra-core/ChakraCore/issues/5847/comments
6
2018-11-26T14:40:02Z
2018-12-02T20:44:00Z
https://github.com/chakra-core/ChakraCore/issues/5847
384,360,105
5,847
[ "chakra-core", "ChakraCore" ]
It would be a good idea to add pr welcoming badge within the `README` file which is a common practice nowadays. Thoughts 🤔
Add PR welcoming badge
https://api.github.com/repos/chakra-core/ChakraCore/issues/5846/comments
4
2018-11-25T15:32:05Z
2018-12-12T00:21:37Z
https://github.com/chakra-core/ChakraCore/issues/5846
384,089,693
5,846
[ "chakra-core", "ChakraCore" ]
```js new Intl.NumberFormat('fr-CA', { style: 'currency', currency: 'CAD', useGrouping: true, minimumIntegerDigits: 1, minimumFractionDigits: 0, maximumFractionDigits: 0}) ``` Result in IE (11): ![image](https://user-images.githubusercontent.com/1498932/48961030-88173300-ef3f-11e8-8d40-d35b62a682fe.png) Result in Edge (18): ![image](https://user-images.githubusercontent.com/1498932/48961024-7cc40780-ef3f-11e8-99fe-b3c24d14e39a.png) Result in Chrome (70): ![image](https://user-images.githubusercontent.com/1498932/48961117-299e8480-ef40-11e8-887c-cb3804e8c8a1.png) Result in Firefox (nightly 65): ![image](https://user-images.githubusercontent.com/1498932/48961005-65851a00-ef3f-11e8-975a-eb45d0060b6c.png)
Edge show fraction digits even if i don't want it
https://api.github.com/repos/chakra-core/ChakraCore/issues/5845/comments
5
2018-11-23T21:52:43Z
2019-02-04T13:01:47Z
https://github.com/chakra-core/ChakraCore/issues/5845
383,932,096
5,845
[ "chakra-core", "ChakraCore" ]
## Expected Behavior ``` new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'EUR', currencyDisplay: 'code', minimumFractionDigits: 3, maximumFractionDigits: 3, }).format(0.001) ``` Result in Edge 17 (and other browsers): "EUR 0.001" ## Current Behavior Result in Edge 18 / Insiders Preview: "EUR0.00" ## Context (Environment) According to one of many user reports: Microsoft Edge 44.17763.1.0 and Microsoft Edge HTML 18.17763 Windows 10 Home Version 1809 4-10-2018 My own investigation: Edge Insiders Preview on BrowserStack (should be close to Edge 18) ## Additional Notes I could not get Edge 18 here https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ Some of my colleague could not get it installed/updated on Windows 10, it remains Edge 17 even now. This brings me to some other questions: Is Edge 18 stable? Has it been released? Did you stop rolling it out to users via Windows Update?
Intl.NumberFormat breaks with currency and more than 2 fraction digits
https://api.github.com/repos/chakra-core/ChakraCore/issues/5842/comments
6
2018-11-22T15:44:30Z
2019-01-03T19:24:25Z
https://github.com/chakra-core/ChakraCore/issues/5842
383,587,002
5,842
[ "chakra-core", "ChakraCore" ]
See also #5798 In Microsoft Edge, executing ```js try { 1 = 2; } catch (e) { alert("Runtime!"); } ``` will cause `"Runtime!"` to be alerted, while the expected behavior should be that an *early* error is thrown, which cannot be caught, and nothing could therefore be alerted. In ```js try { new Function("1=2"); } catch (e) { console.log(e); } ``` however, the function is created without an error being caught and logged. Both indicate that, instead of raising an early ReferenceError (which is the expected behavior), the error is not thrown until runtime.
Assignment to non-reference literals does not raise early errors
https://api.github.com/repos/chakra-core/ChakraCore/issues/5841/comments
0
2018-11-21T03:33:28Z
2018-11-21T11:00:40Z
https://github.com/chakra-core/ChakraCore/issues/5841
382,941,126
5,841
[ "chakra-core", "ChakraCore" ]
I would like to propose a set of changes to update WASM SIMD to the current state of the proposal: - [x] Re-enable and clean up tests (#5839) - [x] Scrub references to `build` instructions and `m128` WASM type (#5903) - [x] Update opcodes to the latest revision of the spec
Update WASM SIMD implementation
https://api.github.com/repos/chakra-core/ChakraCore/issues/5838/comments
1
2018-11-20T18:34:03Z
2019-02-20T22:54:17Z
https://github.com/chakra-core/ChakraCore/issues/5838
382,795,961
5,838
[ "chakra-core", "ChakraCore" ]
Hi, One thinks that OS manufacturers should work on a browser shell standard common to all operating systems, because after all, all browsers do the same thing according to W3C standards. That way, particular brands of browsers like Edge, Safari, Chrome, etc. would all derive from a common standard browser shell present in all operating systems (by shipping on top of it their own JS runtime, extensions and UI for example, in a decoupled way). Then, users would just have to choose what browser brand they want to upgrade to/ or there will be one brand by default installed along the shell in the particular OS (for example the Edge brand in Windows OS, or the Chrome brand in Chrome OS). But the core of the browser would be the same and embedded by default in all OS. This would allow to reduce the internet bandwidth consumption when acquiring and updating new browsers on an OS, and desktop apps built on top of the web platform like carlo/nw.js/electron/uwp apps wouldn't need to ship with chromium (or other potential browsers) while still being compatible with all browser brands, by the simple fact that they would rely on the underlying common standard browser shell.
Cross OS standard browser shell
https://api.github.com/repos/chakra-core/ChakraCore/issues/5836/comments
1
2018-11-18T10:56:41Z
2018-11-20T00:58:46Z
https://github.com/chakra-core/ChakraCore/issues/5836
381,949,293
5,836
[ "chakra-core", "ChakraCore" ]
Due to the way we store a PropertyRecord in the [[description]] slot for Javascript symbols, we aren't able to assign [[description]] to `undefined`. This has a subtle effect but is observable: ```js let empty = Symbol(''); let undef = Symbol(); console.log( {[empty](){}}[empty].name === '[]', // true {[undef](){}}[undef].name === '', // true ); ``` With the implementation of Symbol.prototype.description (#5828), this limitation is much easier to observe: ```js undefined === Symbol().description; // true ``` It's not a straight-forward change to make so I've opened this issue for tracking.
Symbol[[description]] cannot be undefined
https://api.github.com/repos/chakra-core/ChakraCore/issues/5833/comments
0
2018-11-17T02:44:02Z
2018-11-17T02:44:16Z
https://github.com/chakra-core/ChakraCore/issues/5833
381,820,365
5,833
[ "chakra-core", "ChakraCore" ]
This [proposal](https://github.com/tc39/proposal-Symbol-description) is at stage 3. It's implemented in V8, SpiderMonkey and JSC and is shipped in stable versions of Chrome, Firefox and Safari https://github.com/tc39/proposal-Symbol-description/issues/7
Implement Symbol.description
https://api.github.com/repos/chakra-core/ChakraCore/issues/5825/comments
0
2018-11-13T13:40:52Z
2018-11-17T06:33:02Z
https://github.com/chakra-core/ChakraCore/issues/5825
380,230,981
5,825
[ "chakra-core", "ChakraCore" ]
Hi, we are trying to reduce the memory reservation for the `_X64WriteBarrierCardTableManager::_cardTable`. (for windows x64 with address space of 128TB it is reserving 32GB). The default page size is 4KB and we are trying to make it 64 times bigger, i.e. 256KB. We changed the following constants: - [RecyclerWriteBarrierManager::s_WriteBarrierPageSize](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Memory/RecyclerWriteBarrierManager.h#L214), [RecyclerWriteBarrierManager::s_BytesPerCard](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Memory/RecyclerWriteBarrierManager.h#L217), [AutoSystemInfo::PageSize](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/SysInfo.h#L65), [CompileAssert in SysInfo.h](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/SysInfo.h#L138), [__in_ecount_pagesize](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/SysInfo.h#L139) and [__in_ecount_twopagesize](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Core/SysInfo.h#L140) multiplied by 64. - [HeapBlockMap::PagesPer4GB changed to 1 << 14](https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/Memory/HeapBlockMap.h#L292) Is it safe to do it and is there a better way of doing it? Thanks in advance.
Reducing the _X64WriteBarrierCardTableManager::_cardTable memory reservation
https://api.github.com/repos/chakra-core/ChakraCore/issues/5821/comments
5
2018-11-08T14:08:59Z
2018-12-12T00:48:17Z
https://github.com/chakra-core/ChakraCore/issues/5821
378,746,968
5,821
[ "chakra-core", "ChakraCore" ]
Hi Edge version: 42.17134.1.0 Edge HTML: 17.17134 In Edge a newly installed Service Worker is being automatically activated on refresh (ie equivalent to always calling `skipWaiting`). The following bit of code should alert whenever `serviceworker.js` is modified and the browser is refreshed: ```js navigator.serviceWorker.ready.then(function (registration) { console.log('ready'); if (registration.waiting) { alert('waiting'); } }); ``` This never alerts in Edge, but does in Chrome and FireFox.
Service Worker Automatically Skips Waiting
https://api.github.com/repos/chakra-core/ChakraCore/issues/5815/comments
2
2018-11-05T07:31:29Z
2018-11-13T09:11:15Z
https://github.com/chakra-core/ChakraCore/issues/5815
377,280,112
5,815
[ "chakra-core", "ChakraCore" ]
Chakra failed with lots of errors when build with permissive- by msvc on Windows, I use latest source version ce09d0e on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior. **You can repro this issue as the steps below:** 1. git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src 2. Open a clean x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src 3. set CL=/permissive- /d1ParseTrees:identErrors- 4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.17134.0 Build\Chakra.Core.sln /t:Rebuild **Failures:** ByteCodeGenerator.cpp D:\Chakra\src\lib\Common\DataStructures\DictionaryEntry.h(85,17): error C3861: 'ClearValue': identifier not found ClearValue<TValue>::Clear(&this->value); ^ D:\Chakra\src\lib\Common\DataStructures\DictionaryEntry.h(91): note: see reference to class template instantiation 'JsUtil::`anonymous-namespace'::ValueEntry<TValue,TData>' being compiled }; D:\Chakra\src\lib\Common\DataStructures\DictionaryEntry.h(98,39): error C3861: 'ValueToKey': identifier not found TKey Key() const { return ValueToKey<TKey, TValue>::ToKey(this->value); } ^ D:\Chakra\src\lib\Common\DataStructures\DictionaryEntry.h(104): note: see reference to class template instantiation 'JsUtil::`anonymous-namespace'::ImplicitKeyValueEntry<TKey,TValue>' being compiled }; D:\Chakra\src\lib\Common\Memory\SmallHeapBlockAllocator.h(72,51): error C2039: 'IsConcurrentSweepState': is not a member of 'Memory::Recycler' return IsFreeListAllocMode() && recycler->IsConcurrentSweepState(); ^ D:\Chakra\src\lib\Common\Memory\HeapBlock.h(41): note: see declaration of 'Memory::Recycler' class Recycler; D:\Chakra\src\lib\Common\Memory\SmallHeapBlockAllocator.h(109): note: see reference to class template instantiation 'Memory::SmallHeapBlockAllocator<TBlockType>' being compiled }; D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(90,33): error C2039: 'CreateWeakReferenceHandle': is not a member of 'Memory::Recycler' weakRef = recycler->CreateWeakReferenceHandle((T*)this); ^ D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(16): note: see declaration of 'Memory::Recycler' class Recycler; D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(95): note: see reference to class template instantiation 'Memory::WeakReferenceCache<T>' being compiled }; D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(355,47): error C2039: 'FindHeapBlock': is not a member of 'Memory::Recycler' entry->strongRefHeapBlock = recycler->FindHeapBlock(strongReference); ^ D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(16): note: see declaration of 'Memory::Recycler' class Recycler; D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(377): note: see reference to class template instantiation 'Memory::WeakReferenceHashTable<SizePolicy>' being compiled }; D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(358,50): error C2039: 'FindHeapBlock': is not a member of 'Memory::Recycler' HeapBlock * weakRefHeapBlock = recycler->FindHeapBlock(entry); ^ D:\Chakra\src\lib\Common\Memory\RecyclerWeakReference.h(16): note: see declaration of 'Memory::Recycler' class Recycler; D:\Chakra\src\lib\Common\DataStructures\WeakReferenceDictionary.h(232,20): error C3861: 'values': identifier not found return values[i]; ^ D:\Chakra\src\lib\Common\DataStructures\WeakReferenceDictionary.h(822): note: see reference to class template instantiation 'JsUtil::SplitWeakDictionary<TEntry,TWeak,keyIsWeak,SizePolicy,Comparer,Lock,AllocType>' being compiled }; D:\Chakra\src\lib\Common\DataStructures\WeakReferenceDictionary.h(239,20): error C3861: 'values': identifier not found return values[i]; ^ D:\Chakra\src\lib\Runtime\Base\PropertyRecord.h(139,18): error C2039: 'GetPropertyRecord': is not a member of 'Js::JavascriptString' str->GetPropertyRecord(&propRecord); ^ D:\Chakra\src\lib\Runtime\Runtime.h(144): note: see declaration of 'Js::JavascriptString' class JavascriptString; D:\Chakra\src\lib\Runtime\Base\PropertyRecord.h(161): note: see reference to class template instantiation 'Js::BuiltInPropertyRecord<LEN>' being compiled }; D:\Chakra\src\lib\Runtime\Base\PropertyRecord.h(143,36): error C2039: 'GetString': is not a member of 'Js::JavascriptString' return Equals(str->GetString(), str->GetLength()); ^ D:\Chakra\src\lib\Runtime\Runtime.h(144): note: see declaration of 'Js::JavascriptString' class JavascriptString; D:\Chakra\src\lib\Runtime\Base\PropertyRecord.h(143,54): error C2039: 'GetLength': is not a member of 'Js::JavascriptString' return Equals(str->GetString(), str->GetLength()); ^ D:\Chakra\src\lib\Runtime\Runtime.h(144): note: see declaration of 'Js::JavascriptString' class JavascriptString; D:\Chakra\src\lib\Runtime\Base\CrossSite.h(29,41): error C3861: 'CrossSiteObject': identifier not found BOOL ret = VirtualTableInfo<CrossSiteObject<T>>::HasVirtualTable(obj); ^ D:\Chakra\src\lib\Runtime\Base\CrossSite.h(29,41): note: This diagnostic occurred in the compiler generated function 'BOOL Js::CrossSite::IsCrossSiteObjectTyped(T *)' BOOL ret = VirtualTableInfo<CrossSiteObject<T>>::HasVirtualTable(obj); ^ D:\Chakra\src\lib\Runtime\Language\InlineCache.h(412,62): error C2039: 'GetLibrary': is not a member of 'Js::ScriptContext' *propertyValue = IsMissing ? requestContext->GetLibrary()->GetFalse() : requestContext->GetLibrary()->GetTrue(); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Language\InlineCache.h(412,105): error C2039: 'GetLibrary': is not a member of 'Js::ScriptContext' *propertyValue = IsMissing ? requestContext->GetLibrary()->GetFalse() : requestContext->GetLibrary()->GetTrue(); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Base\FunctionBody.h(3473,20): error C3861: 'GetSlot': identifier not found fn(GetSlot[i]); ^ D:\Chakra\src\lib\Runtime\Base\FunctionBody.h(3473,20): note: This diagnostic occurred in the compiler generated function 'void Js::ScopeSlots::Map(Fn)' fn(GetSlot[i]); ^ D:\Chakra\src\lib\Runtime\Language\PrototypeChainCache.h(197,28): error C2039: 'InvalidateStoreFieldCaches': is not a member of 'Js::ScriptContext' scriptContext->InvalidateStoreFieldCaches(propertyId); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Language\PrototypeChainCache.h(197,28): note: This diagnostic occurred in the compiler generated function 'bool Js::OnlyWritablePropertyCache::ProcessProperty(Js::DynamicTypeHandler *,Js::PropertyAttributes,KeyType,Js::ScriptContext *)' scriptContext->InvalidateStoreFieldCaches(propertyId); ^ D:\Chakra\src\lib\Runtime\Library\StringCache.h(66,28): error C2039: 'FindPropertyRecord': is not a member of 'Js::ScriptContext' scriptContext->FindPropertyRecord(value, N - 1, &propertyRecord); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Library\StringCache.h(66,28): note: This diagnostic occurred in the compiler generated function 'Js::JavascriptString *Js::StringCache::InitializeString(const char16 (&)[N]) const' scriptContext->FindPropertyRecord(value, N - 1, &propertyRecord); ^ D:\Chakra\src\lib\Runtime\Library\StringCache.h(69,35): error C2039: 'GetPropertyString': is not a member of 'Js::ScriptContext' return scriptContext->GetPropertyString(propertyRecord->GetPropertyId()); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Library\StringCache.h(69,35): note: This diagnostic occurred in the compiler generated function 'Js::JavascriptString *Js::StringCache::InitializeString(const char16 (&)[N]) const' return scriptContext->GetPropertyString(propertyRecord->GetPropertyId()); ^ D:\Chakra\src\lib\Runtime\Library\StringCache.h(73,120): error C2039: 'GetRecycler': is not a member of 'Js::ScriptContext' return LiteralString::New(stringTypeStatic, value, N - 1 /*don't include terminating NUL*/, scriptContext->GetRecycler()); ^ D:\Chakra\src\lib\Runtime\Runtime.h(210): note: see declaration of 'Js::ScriptContext' class ScriptContext; D:\Chakra\src\lib\Runtime\Library\StringCache.h(73,120): note: This diagnostic occurred in the compiler generated function 'Js::JavascriptString *Js::StringCache::InitializeString(const char16 (&)[N]) const' return LiteralString::New(stringTypeStatic, value, N - 1 /*don't include terminating NUL*/, scriptContext->GetRecycler()); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3456,13): error C2065: 'PreVisitCatch': undeclared identifier PreVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3456,13): error C3861: 'PreVisitCatch': identifier not found PreVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3456,26): note: 'PreVisitCatch': function declaration must be available as none of the arguments depend on a template parameter PreVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3468,13): error C2065: 'PostVisitCatch': undeclared identifier PostVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3468,13): error C3861: 'PostVisitCatch': identifier not found PostVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3468,27): note: 'PostVisitCatch': function declaration must be available as none of the arguments depend on a template parameter PostVisitCatch(pnodeCatchScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3476,13): error C2065: 'PreVisitWith': undeclared identifier PreVisitWith(pnodeScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3476,13): error C3861: 'PreVisitWith': identifier not found PreVisitWith(pnodeScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3476,25): note: 'PreVisitWith': function declaration must be available as none of the arguments depend on a template parameter PreVisitWith(pnodeScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3481,13): error C2065: 'PostVisitWith': undeclared identifier PostVisitWith(pnodeScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3481,13): error C3861: 'PostVisitWith': identifier not found PostVisitWith(pnodeScope, byteCodeGenerator); ^ D:\Chakra\src\lib\Runtime\ByteCode\ByteCodeGenerator.cpp(3481,26): note: 'PostVisitWith': function declaration must be available as none of the arguments depend on a template parameter PostVisitWith(pnodeScope, byteCodeGenerator); ^
Chakra failed when build with permissive- by msvc on Windows
https://api.github.com/repos/chakra-core/ChakraCore/issues/5813/comments
4
2018-11-02T06:21:43Z
2019-11-26T08:18:45Z
https://github.com/chakra-core/ChakraCore/issues/5813
376,684,002
5,813
[ "chakra-core", "ChakraCore" ]
Hi, My boss wants to know how many shell only functions in CharaCore. It's quite difficult to know all built-in functions and distinguish them which are shell only function. What could I do to find the shell only functions? Thanks~
Does ChakraCore contains shell only functions?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5811/comments
6
2018-11-01T09:42:20Z
2018-11-20T01:01:59Z
https://github.com/chakra-core/ChakraCore/issues/5811
376,320,567
5,811
[ "chakra-core", "ChakraCore" ]
In Microsoft Edge 42.17134.1.0 on Windows 10, opening developer tools and running `Number.MIN_VALUE.toString(2)` causes the browser tab to crash and reload. Looks like the same area as #509? The precise value of `Number.MIN_VALUE` is 2<sup>-1074</sup>, so I believe the correct return value is the 1076-character string: > 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
Crashes on Number.MIN_VALUE.toString(2)
https://api.github.com/repos/chakra-core/ChakraCore/issues/5809/comments
2
2018-10-31T00:42:32Z
2018-10-31T22:55:45Z
https://github.com/chakra-core/ChakraCore/issues/5809
375,752,186
5,809
[ "chakra-core", "ChakraCore" ]
Executing a failing script and getting error details with JsGetAndClearExceptionWithMetadata seems to trigger an assert condition in some cases, apparently when some Unicode characters are used. Sample script: ``` function main() { var x = '€' + test(); } main(); ``` Test program (slightly modified version of the C++ HelloWorld sample): ``` #define _JSRT_ #include "ChakraCore.h" #include <string> #include <iostream> using namespace std; int main() { JsRuntimeHandle runtime; JsContextRef context; JsValueRef result; unsigned currentSourceContext = 0; wstring script = L"function main() {\n var x = '€' + test();\n}\nmain();"; // Create a runtime. JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime); // Create an execution context. JsCreateContext(runtime, &context); // Now set the execution context as being the current one on this thread. JsSetCurrentContext(context); // Run the script. JsErrorCode runResult = JsRunScript(script.c_str(), currentSourceContext++, L"", &result); if (runResult != JsNoError) { JsValueRef exception; if (JsGetAndClearExceptionWithMetadata(&exception) != JsNoError) { std::cout << "failed to get exception"; } else { std::cout << "got exception"; } } else { std::cout << "no error!"; } // Convert your script result to String in JavaScript; redundant if your script returns a String JsValueRef resultJSString; JsConvertValueToString(result, &resultJSString); // Project script result in JS back to C++. const wchar_t *resultWC; size_t stringLength; JsStringToPointer(resultJSString, &resultWC, &stringLength); wstring resultW(resultWC); cout << string(resultW.begin(), resultW.end()) << endl; system("pause"); // Dispose runtime JsSetCurrentContext(JS_INVALID_REFERENCE); JsDisposeRuntime(runtime); return 0; } ``` When running this code in debug mode it fails at this assert: https://github.com/Microsoft/ChakraCore/blob/6d96d5b98638fe4535bb4db906378938338050bb/lib/Runtime/Library/JavascriptExceptionMetadata.cpp#L146 After replacing the '€' with something else (for example, 'a'), it works as expected (prints "got exception").
"Line ending logic out of sync" assert when calling JsGetAndClearExceptionWithMetadata
https://api.github.com/repos/chakra-core/ChakraCore/issues/5805/comments
2
2018-10-30T00:29:59Z
2019-04-09T22:28:34Z
https://github.com/chakra-core/ChakraCore/issues/5805
375,270,849
5,805
[ "chakra-core", "ChakraCore" ]
I'm running with ChakraCore v1.10.2 on Linux. I'm using libChakraCore as a static library and calling into the library from a Rust library that is a wrapper on libChakraCore. I'm running into a problem where occasionally some of my Rust tests get a SIGABRT. I get the following stack trace within the JSRT library: ` #0 0x00007f66ace7b428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007f66ace7d02a in __GI_abort () at abort.c:89 #2 0x000055c5cdfeaa02 in PROCEndProcess(void*, unsigned int, int) () #3 0x000055c5ce03d7cf in ReportFatalException () #4 0x000055c5ce03d8d9 in OutOfMemory_unrecoverable_error() () #5 0x000055c5ce04448c in Js::Exception::RaiseIfScriptActive(Js::ScriptContext*, unsigned int, void*) () #6 0x000055c5cdb3ddb9 in Js::Throw::OutOfMemory() () #7 0x000055c5ce043030 in PageStack<Memory::MarkContext::MarkCandidate>::Init(unsigned int) () #8 0x000055c5ce042907 in Memory::MarkContext::Init(unsigned int) () #9 0x000055c5cdb5e335 in Memory::Recycler::Initialize(bool, JsUtil::ThreadService*, bool) () #10 0x000055c5cdba53ee in ThreadContext::EnsureRecycler() () #11 0x000055c5cdb33d9a in JsrtContextCore::New(JsrtRuntime*) () #12 0x000055c5cdac413f in CreateContextCore(void*, TTD::TTDJsRTActionResultAutoRecorder&, bool, bool, bool, void**) () #13 0x000055c5cdac55b1 in JsCreateContext () ` Note that I haven't been able to reproduce this with a debug build of libChakraCoreStatic.a.
SIGABRT in JsCreateContext on Linux
https://api.github.com/repos/chakra-core/ChakraCore/issues/5804/comments
20
2018-10-29T17:58:56Z
2018-11-21T00:40:55Z
https://github.com/chakra-core/ChakraCore/issues/5804
375,144,486
5,804
[ "chakra-core", "ChakraCore" ]
Test: https://github.com/tc39/test262/blob/master/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-9-lhs-assignment-operator-assignment-expression.js ```js import('') += 1; ``` Is producing a SyntaxError; however, like: ```js (() => 1) += 1; ``` It _should_ produce an Early ReferenceError.
BUG: ImportCall is an invalid AssignmentTargetType, should produce an Early ReferenceError
https://api.github.com/repos/chakra-core/ChakraCore/issues/5798/comments
5
2018-10-25T21:03:28Z
2020-03-25T22:50:25Z
https://github.com/chakra-core/ChakraCore/issues/5798
374,131,899
5,798
[ "chakra-core", "ChakraCore" ]
Test: https://github.com/tc39/test262/blob/master/test/language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js TL;DR: ```js new import(''); ``` Is not allowed, per: https://tc39.github.io/proposal-dynamic-import/#sec-left-hand-side-expressions
BUG: ImportCall is a CallExpression, it can't be preceded by the new keyword
https://api.github.com/repos/chakra-core/ChakraCore/issues/5797/comments
1
2018-10-25T20:55:48Z
2018-11-01T01:05:42Z
https://github.com/chakra-core/ChakraCore/issues/5797
374,129,165
5,797
[ "chakra-core", "ChakraCore" ]
Test: https://github.com/tc39/test262/blob/master/test/language/expressions/dynamic-import/assignment-expression/unary-expr.js Result: > Couldn't load file 'true' > Couldn't load file 'undefined' > Couldn't load file 'object' > Couldn't load file 'NaN' > Couldn't load file '-1' Expected: every import call should return a promise that will be resolved/rejected at some later time. Presently, the import fails and produces these errors synchronously.
BUG: Dynamic import should only return a rejected promise if it fails loading a module
https://api.github.com/repos/chakra-core/ChakraCore/issues/5796/comments
7
2018-10-25T20:28:31Z
2018-11-01T01:05:42Z
https://github.com/chakra-core/ChakraCore/issues/5796
374,119,014
5,796
[ "chakra-core", "ChakraCore" ]
Test: https://github.com/tc39/test262/blob/master/test/language/expressions/dynamic-import/always-create-new-promise.js Result: > the returned promises are not the same, regardless the reference and specifier pair Expected SameValue(«[object Promise]», «[object Promise]») to be false
BUG: Dynamic import should return different promise objects, even if the specifier is the same.
https://api.github.com/repos/chakra-core/ChakraCore/issues/5795/comments
3
2018-10-25T18:24:32Z
2018-11-01T01:05:42Z
https://github.com/chakra-core/ChakraCore/issues/5795
374,072,761
5,795
[ "chakra-core", "ChakraCore" ]
Currently it is not supported in ChakraCore. Per discussion with ChakraCore team, a new API is needed and a sample showing how to use it will be very helpful
Need to enable Out of Proc JIT support in ChakraCore.
https://api.github.com/repos/chakra-core/ChakraCore/issues/5793/comments
0
2018-10-24T18:23:13Z
2018-11-20T23:27:39Z
https://github.com/chakra-core/ChakraCore/issues/5793
373,614,963
5,793
[ "chakra-core", "ChakraCore" ]
CFG is enabled for JIT code for Chakra used for Edge context. The same should be done for ChakraCore so app hosting ChakraCore can receive the same protection as Edge.
enable CFG in the JIT'd code for ChakraCore
https://api.github.com/repos/chakra-core/ChakraCore/issues/5790/comments
2
2018-10-22T21:03:33Z
2019-03-08T23:08:27Z
https://github.com/chakra-core/ChakraCore/issues/5790
372,699,343
5,790
[ "chakra-core", "ChakraCore" ]
```js Date.parse("2018-10-21Z"); // lacks time, it should be 2018-10-21T00:00Z ``` Expected: `NaN` Actual: `1540080000000` ```js Date.parse("2018-1-7T00:00Z"); // no padded zero, should be 2018-01-07T00:00Z ``` Expected: `NaN` Actual: `1515283200000`
Date.parse accepts illegal ISO8601 format
https://api.github.com/repos/chakra-core/ChakraCore/issues/5789/comments
1
2018-10-21T12:05:33Z
2018-11-02T16:43:44Z
https://github.com/chakra-core/ChakraCore/issues/5789
372,307,805
5,789
[ "chakra-core", "ChakraCore" ]
The following code will infinitely loop and alert "Child foo" in MS Edge. All other browsers seem to handle this correctly. ```js class Base { foo() { alert('base foo'); } } class Child extends Base { foo() { const parent = () => super.foo; alert('Child foo'); parent().call(this); } } (new Child()).foo(); ```
Arrow functions fail to properly capture references to super
https://api.github.com/repos/chakra-core/ChakraCore/issues/5784/comments
2
2018-10-15T18:58:50Z
2019-07-23T00:17:22Z
https://github.com/chakra-core/ChakraCore/issues/5784
370,299,757
5,784
[ "chakra-core", "ChakraCore" ]
I have the exact same issue as this one: https://github.com/Microsoft/ChakraCore/issues/4532 Which looks like it was closed without resolution. In my case, we are using the c# library chakracore.net: https://github.com/JohnMasen/ChakraCore.NET And the issue happens under stress testing. It happens when a js function we have called returns a promise, which we are changing into a Task on the C# side. We call the js function, get back the promise object, and then try to call "then" on it, passing in an onfulfilled and onrejected callback. Chakracore.net appears to be correctly adding GCHandles to the callback, as well as calling JsAddRef for them before the callbacks are passed in as parameters to the "then" function call. More specifically, in the VALIDATE_INCOMING_REFERENCE call for the 2nd argument of the function (the 1st will be the 'this' parameter) fails with a nullptr. This can happen after 100's of successful calls. We are using this in an ASP.NET Core application (with .net core). Context switching for the different threads also appears to be correctly managed by the chakracore.net library. Any ideas on how to further troubleshoot this?
nullptr in VALIDATE_INCOMING_REFERENCE causes a crash
https://api.github.com/repos/chakra-core/ChakraCore/issues/5782/comments
1
2018-10-15T16:44:25Z
2020-03-26T22:29:15Z
https://github.com/chakra-core/ChakraCore/issues/5782
370,249,453
5,782
[ "chakra-core", "ChakraCore" ]
We have .net core application running on cent os7, If we want to use ChakraCore with multithread (on linux) Our application had crashing issues, After that we used Semaphore to call Chakra methods and allowed only one thread concurrently, Now we are having this error occasionally : ======= Memory map: ======== /myapplication/libChakraCore.so(+0x151c3e)[0x7f1c38a82c3e] /lib64/libc.so.6(+0x1186a2)[0x7f1cb60ba6a2] /lib64/libc.so.6(__fortify_fail+0x37)[0x7f1cb60ba6e7] ======= Backtrace: ========= *** stack smashing detected ***: /usr/bin/dotnet terminated
*** stack smashing detected ***
https://api.github.com/repos/chakra-core/ChakraCore/issues/5781/comments
0
2018-10-15T08:45:59Z
2018-10-15T08:46:12Z
https://github.com/chakra-core/ChakraCore/issues/5781
370,058,512
5,781
[ "chakra-core", "ChakraCore" ]
Another bug I found whilst working on #5759 though I do not currently have a fix planned for this. Per https://tc39.github.io/ecma262/#sec-module-semantics-static-semantics-early-errors It is a Syntax Error if any element of the ExportedBindings of ModuleItemList does not also occur in either the VarDeclaredNames of ModuleItemList, or the LexicallyDeclaredNames of ModuleItemList. POC: ```js //start.js import {Fun} from "./other.js"; print(Fun); ``` ```js //other.js export {anything as Fun}; ``` Note the same repros if instead of "anything" you use any other undeclared name OR use a global like Number or Array or if you don't alias "anything". Output with ch: `undefined`, jsc and v8 throw Syntax Errors (Can't do an eshost repro at the moment as eshost doesn't yet interact with ch's module flag) This causes numerous test262 failures.
BUG: Module exporting undeclared name should be a syntax error
https://api.github.com/repos/chakra-core/ChakraCore/issues/5778/comments
8
2018-10-13T20:00:30Z
2018-11-22T04:02:39Z
https://github.com/chakra-core/ChakraCore/issues/5778
369,835,978
5,778
[ "chakra-core", "ChakraCore" ]
I found this whilst working on #5759 and plan to fix it alongside implement #5759 (as fixing this is necessary to pass one of relevant test262 tests for that feature) Per: https://tc39.github.io/ecma262/#sec-module-semantics-static-semantics-early-errors It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries. POC: ```js //start.js export const boo = 4; export {bar as boo} from "other.js"; print("should not be printed"); ``` ```js //other.js export const bar = 5; ``` Running this in ch with the module flag the output is "should not be printed". In v8 and jsc the output is SyntaxError: Duplicate export of 'boo' (Can't do an eshost repro at the moment as eshost doesn't yet interact with ch's module flag) This is because indirect exports (i.e. ones involving "from" and local exports are stored separately and not checked against each other for duplicates)
BUG: Module with duplicate export name should always be a syntax error
https://api.github.com/repos/chakra-core/ChakraCore/issues/5777/comments
0
2018-10-13T16:17:29Z
2018-10-31T02:18:49Z
https://github.com/chakra-core/ChakraCore/issues/5777
369,816,887
5,777
[ "chakra-core", "ChakraCore" ]
Hi , I've made some performance measurements, because we have very big spikes sometimes when GC kick in and I found something weird. When DoCollect is called with CollectOverride_ForceInThread reflect in some very long waits. I am wondering, if this is expected or I do something wrong. Also is there any way to reduce GC spikes. I try to poke some of heuristics in recycler.cpp, but i didn't find any noticeable difference. My trace looks like this (we have 1 main and 2 background worker threads) : ![image](https://user-images.githubusercontent.com/6154617/46801902-93821680-cd64-11e8-8611-c024c5ce01ef.png)
GC concurrent collection performance
https://api.github.com/repos/chakra-core/ChakraCore/issues/5774/comments
2
2018-10-11T12:07:50Z
2018-11-20T01:07:19Z
https://github.com/chakra-core/ChakraCore/issues/5774
369,089,850
5,774
[ "chakra-core", "ChakraCore" ]
Git Head: aa9823c336281421a1adbe9e6ce3e73cee7dcaf6 To reproduce: `ch so.js` Crashing payload: ```js for(v in 0){if((0)){([]);0[""]=function(){e=function(){[""]([])()=[]}}[""]=function(){}[""]=function(){((0))};if(0){[]((function(){if((0 instanceof 0)){}}))}else if(0){if([])if(0){if(y=""){(0());if("")o=function(){(0)}==""?(c):(0)}{function l(){}if([]){(0)[0]={0:(n0),0:(function(){}),0:(function(){}),0:(function(){}),0:(function(){switch(0){case"":c:{if(e[0]=""){0((0))}}}}),0:(function(){0}),0:(function(){if(0){0}}),0:(function(){for(;;){if([]){}}throw""}),s:(function(){;if(0[0]=''){if(0){(0)}{0()}}try{(+a)}catch(e){("")}0[0]}),0:(function(){if([]){}}),0:(function(){hr((0))}),0:(function(e){}),0:(function(s){;if(0){0}}),0:(function(){((0))})}[""];if(0){{((function(){f={"":(function(){0()}),"":(0),"":(f),"":(function(){if(0){((0))}})};v=function(){("",'');if(s){for(;;){if(0){([])}}}(0)};/()/;function c(){(0);return{};if(0){((function(){})).r=""}if(0){("")+""}(0)}}));("");switch(0){case"":[((0)?0?((0)):(((0))/0):0)][0];;switch(0){case"":[]}function e(){("")((h))}(00);for(;;);if("")"";if(0)function P(){(((0)))}function U(){while(0){if(0)if((0)){(0);if((0)==0)if((0)==0)(0)[0]}}}function g(){function s(){(0)[0]}if(0){}else if(0){i("")}function l(){for(;;)if(0){}else if(0){{(0)}}function t(){("");if(0){(0)}}0[""]=0;function F(){("");for(;;)(0);[]}function l(){for(;;)if(0)0}}[""];function e(){if(0)try{(0());i}finally{(0)()}s={"":"","":"","":"","":"","":"","":"","":"","":"","":""};function p(){i0(0)(0)}function d(){([]="");while("")if(0){([]);if(0){}}}{switch(0){case"":((0)[0]+""()[0]+""())()}if([])if(0)(0)}}try{{return""}if(p="")if([]="")switch([]){}}catch(e){}(("")>0)("")}function d(){(/0/(function(){""}))}function e(){if(0)try{(0)}catch(e){if(0)tu}(0())}[];function a(){if(0)0}var[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ ``` Extract from ASAN log (full log available here: https://gist.github.com/fumfel/3880844219c020c750a03c110754c422): ``` ==13754==ERROR: AddressSanitizer: stack-overflow on address 0x7ffd9b5a9ff8 (pc 0x556bc2ebcd1e bp 0x7ffd9b5aa030 sp 0x7ffd9b5a9ff0 T0) #0 0x556bc2ebcd1d in Scanner<UTF8EncodingPolicyBase<false> >::IchMinTok() const XYZ/ChakraCore/lib/Parser/Scan.h:495:9 #1 0x556bc2f5fa92 in ParseNodeUni* Parser::ParseDestructuredArrayLiteral<true>(tokens, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12964:46 #2 0x556bc2f5c713 in ParseNode* Parser::ParseDestructuredLiteral<true>(tokens, bool, bool, DestructuringInitializerContext, bool, int*, int*) XYZ/ChakraCore/lib/Parser/Parse.cpp:12672:17 #3 0x556bc2f5997b in ParseNode* Parser::ParseDestructuredVarDecl<true>(tokens, bool, bool*, bool, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12836:21 #4 0x556bc2f5fbdb in ParseNodeUni* Parser::ParseDestructuredArrayLiteral<true>(tokens, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12979:38 #5 0x556bc2f5c713 in ParseNode* Parser::ParseDestructuredLiteral<true>(tokens, bool, bool, DestructuringInitializerContext, bool, int*, int*) XYZ/ChakraCore/lib/Parser/Parse.cpp:12672:17 #6 0x556bc2f5997b in ParseNode* Parser::ParseDestructuredVarDecl<true>(tokens, bool, bool*, bool, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12836:21 #7 0x556bc2f5fbdb in ParseNodeUni* Parser::ParseDestructuredArrayLiteral<true>(tokens, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12979:38 #8 0x556bc2f5c713 in ParseNode* Parser::ParseDestructuredLiteral<true>(tokens, bool, bool, DestructuringInitializerContext, bool, int*, int*) XYZ/ChakraCore/lib/Parser/Parse.cpp:12672:17 #9 0x556bc2f5997b in ParseNode* Parser::ParseDestructuredVarDecl<true>(tokens, bool, bool*, bool, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12836:21 #10 0x556bc2f5fbdb in ParseNodeUni* Parser::ParseDestructuredArrayLiteral<true>(tokens, bool, bool) XYZ/ChakraCore/lib/Parser/Parse.cpp:12979:38 ```
Stack overflow in Scanner<UTF8EncodingPolicyBase<false> >::IchMinTok()
https://api.github.com/repos/chakra-core/ChakraCore/issues/5773/comments
2
2018-10-10T06:48:36Z
2018-12-12T00:45:49Z
https://github.com/chakra-core/ChakraCore/issues/5773
368,516,724
5,773
[ "chakra-core", "ChakraCore" ]
Now that export-ns-from [has TC39 consensus](https://github.com/tc39/ecma262/pull/1174#issuecomment-425120082) the TC39 is looking for engines to implement. *Related: [V8 issue](https://bugs.chromium.org/p/v8/issues/detail?id=8101) and [SpiderMonkey issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1496852)*
Implement export-ns-from syntax.
https://api.github.com/repos/chakra-core/ChakraCore/issues/5759/comments
7
2018-10-05T21:18:57Z
2018-10-31T02:18:49Z
https://github.com/chakra-core/ChakraCore/issues/5759
367,371,999
5,759
[ "chakra-core", "ChakraCore" ]
How can I indentify an NaN value with the JSRT APIs? JsGetValueType returns JsNumber (which seems to be consistent with the expected behavior for "typeof NaN"), and JsNumberToInt returns 0. So, I'm having trouble distinguishing between NaN and a valid number.
How to identify NaN?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5756/comments
4
2018-10-05T14:44:08Z
2018-10-09T23:24:07Z
https://github.com/chakra-core/ChakraCore/issues/5756
367,242,362
5,756
[ "chakra-core", "ChakraCore" ]
See https://github.com/tc39/ecma262/pull/1243. This specification change achieved consensus at the September 2018 TC39 meeting. Chakra is the only engine that does not implement the modified property order. ```sh $ eshost -e 'x = new String(); x[2**32-2] = 1; x[2**32-1] = 1; x[2**53-1] = 1; x[2**53] = 1; Reflect.ownKeys(x)' #### Chakra 4294967294,4294967295,9007199254740991,9007199254740992,length #### JavaScriptCore 4294967294,length,4294967295,9007199254740991,9007199254740992 #### V8 --harmony 4294967294,length,4294967295,9007199254740991,9007199254740992 #### V8 4294967294,length,4294967295,9007199254740991,9007199254740992 #### SpiderMonkey 4294967294,length,4294967295,9007199254740991,9007199254740992 ```
Fix OwnPropertyKeys order for String objects
https://api.github.com/repos/chakra-core/ChakraCore/issues/5738/comments
0
2018-10-02T18:22:42Z
2018-12-10T21:59:45Z
https://github.com/chakra-core/ChakraCore/issues/5738
366,021,681
5,738
[ "chakra-core", "ChakraCore" ]
As @Penguinwizzard mentioned [here](https://github.com/Microsoft/ChakraCore/pull/5456#discussion_r220382324), > This feels like there's a few situations in which a smart compiler would be able to make it always return true - e.g. with a static build and ltcg, I think it may be legal to optimize the "GetTypeId() == mytypeid" ::Is() checks for various object types in our type system to always return true when working on the same type as that passed in - since there's no avenue other than UB to change the typeid of valid objects of that pointer type to something else. Since we're already doing effectively that, it's not a regression with this change, but in a future change we'll most likely want to change this to being closer to VarIs in terms of signature, with the exception of making the last line `AssertOrFailFast(VarIsImpl<T>(obj))`. This issue is a reminder to come back to check on calls to VarIsCorrectType.
review type checks that should be tautologically true
https://api.github.com/repos/chakra-core/ChakraCore/issues/5737/comments
0
2018-10-01T22:45:25Z
2019-06-07T18:31:20Z
https://github.com/chakra-core/ChakraCore/issues/5737
365,672,393
5,737
[ "chakra-core", "ChakraCore" ]
This proposal is at stage 3 and seeking implementations: https://github.com/tc39/proposal-well-formed-stringify
Implement well-formed JSON.stringify proposal
https://api.github.com/repos/chakra-core/ChakraCore/issues/5735/comments
0
2018-09-29T15:02:49Z
2019-07-22T21:29:35Z
https://github.com/chakra-core/ChakraCore/issues/5735
365,139,614
5,735
[ "chakra-core", "ChakraCore" ]
Program below executes outer WASM loop only once. However, removing one of the parameters to the function makes the issue go away. ``` $ cat bug.wast (module (import "dummy" "memory" (memory 1)) (func (export "bug") (param $src1 i32) (param $src2 i32) ;; <== Comment one of "src" paramters out and it works (param $dst i32) (param $sz i32) (local $i i32) (local $j i32) (local $off i32) (set_local $i (i32.const 0)) (set_local $j (i32.const 0)) (set_local $off (i32.const 0)) (block $outer (loop $outer_top (br_if $outer (i32.eq (get_local $j) (get_local $sz))) (block $inner (loop $inner_top (br_if $inner (i32.eq (get_local $i) (get_local $sz))) (f32.store (i32.add (get_local $dst) (get_local $off)) (f32.load (i32.add (get_local $src1) (get_local $off))) ) (set_local $off (i32.add (get_local $off) (i32.const 4))) (set_local $i (i32.add (get_local $i) (i32.const 1))) (br $inner_top) ) ) (set_local $j (i32.add (get_local $j) (i32.const 1))) (br $outer_top) ) ) ) ) $ cat repro.js function print_4(arr, off) { print("2x2 data: "); print(arr[off] + " " + arr[off + 1]); print(arr[off + 2] + " " + arr[off + 3]); } const INITIAL_SIZE = 1; const memObj = new WebAssembly.Memory({initial:INITIAL_SIZE}); const module = new WebAssembly.Module(readbuffer('bug.wasm')); const instance = new WebAssembly.Instance(module, { "dummy" : { "memory" : memObj } }).exports; let data = new Float32Array (memObj.buffer); // First operand data[0] = 1; data[1] = 2; data[2] = 3; data[3] = 4; // Second operand data[8] = 5; data[9] = 6; data[10] = 7; data[11] = 8; // Zero result data[16] = 0; data[17] = 0; data[18] = 0; data[19] = 0; print("=== Original ==="); print_4(data, 0); print_4(data, 8); print_4(data, 16); instance["bug"](0, 32, 64, 2); print("=== After call ==="); print_4(data, 0); print_4(data, 8); print_4(data, 16); $ wat2wasm bug.wast -o bug.wasm $ ch -wasm repro.js === Original === 2x2 data: 1 2 3 4 2x2 data: 5 6 7 8 2x2 data: 0 0 0 0 === After call === 2x2 data: 1 2 3 4 2x2 data: 5 6 7 8 2x2 data: 1 2 0 0 ``` Commenting out `$src2` parameter in wasm function (or `$src1`, depending on which is used) produces desired output: ``` === Original === 2x2 data: 1 2 3 4 2x2 data: 5 6 7 8 2x2 data: 0 0 0 0 === After call === 2x2 data: 1 2 3 4 2x2 data: 1 2 3 4 2x2 data: 1 2 3 4 ``` The problem persists for other sizes, not only 2x2. This was found with WebAssembly/wabt@048e01a, but other versions might work as well. I am interested in working on a fix for this. +@arunetm
WASM nested loop
https://api.github.com/repos/chakra-core/ChakraCore/issues/5730/comments
6
2018-09-28T17:25:36Z
2018-10-30T17:37:04Z
https://github.com/chakra-core/ChakraCore/issues/5730
364,975,992
5,730
[ "chakra-core", "ChakraCore" ]
Here is the error I encountered when I was trying to build release 1.5 on Linux: /scratch/.../.../.../ChakraCore-1.5.0/lib/Backend/IRBuilderAsmJs.cpp:1158:14: error: comparison of two values with different enumeration types in switch statement ('Js::AsmJsRetType::Which' and 'Js::AsmJsVarType::Which') [-Werror,-Wenum-compare-switch] case Js::AsmJsVarType::Which::Int64: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Any solution for this? Thanks in advance.
error on building on release 1.5
https://api.github.com/repos/chakra-core/ChakraCore/issues/5729/comments
1
2018-09-26T02:48:39Z
2018-10-09T00:04:34Z
https://github.com/chakra-core/ChakraCore/issues/5729
363,837,531
5,729
[ "chakra-core", "ChakraCore" ]
```js function getCallsite(c) { return c; } function getFooCallsite() { return getCallsite`foo`; } print(eval('getCallsite`foo`') === eval('getCallsite`foo`')); // returns: true, expected: false ``` ``` ## Source function getCallsite(c) { return c; } function getFooCallsite() { return getCallsite`foo`; } print(eval('getCallsite`foo`') === eval('getCallsite`foo`')); #### ch true #### jsc, sm, v8, xs false ``` Behavior Changed in #5727
StringTemplate Caching in eval is incorrect.
https://api.github.com/repos/chakra-core/ChakraCore/issues/5728/comments
0
2018-09-25T22:40:56Z
2019-07-23T00:20:50Z
https://github.com/chakra-core/ChakraCore/issues/5728
363,793,165
5,728
[ "chakra-core", "ChakraCore" ]
TextEncoder and TextDecoder have been missing from IE/Edge forever. This is a document of the api... https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder Here is your status compared to other's status. https://caniuse.com/#search=uint8array I did just notice that there's a 'in development' note on 'can i use' https://developer.microsoft.com/en-us/microsoft-edge/platform/status/encodingstandard But actually going there and searching for 'TextEncoder' yields no results.
Support TextEncoder&TextDecoder
https://api.github.com/repos/chakra-core/ChakraCore/issues/5726/comments
5
2018-09-24T18:46:09Z
2018-11-20T01:09:45Z
https://github.com/chakra-core/ChakraCore/issues/5726
363,273,463
5,726
[ "chakra-core", "ChakraCore" ]
This seems a little ridiculous, but I am encountering a sudden crash in a very simple usage of the JSRT. This is my complete usage: ``` constexpr auto kScript = R"( var module = {} module.foo = function() { var junk = Math.cos(0.5) * 0; } module; )"; int main() { JsRuntimeHandle runtime; JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime); JsContextRef context; JsCreateContext(runtime, &context); JsValueRef module; { JsSetCurrentContext(context); JsValueRef script, url; JsCreateExternalArrayBuffer((void*)kScript, strlen(kScript), nullptr, nullptr, &script); JsCreateString("foo.js", 6, &url); JsRun(script, 0, url, JsParseScriptAttributeNone, &module); JsAddRef(module, nullptr); JsSetCurrentContext(JS_INVALID_REFERENCE); } for (int i = 0; i < 100000; i += 1) { std::cout << "iteration=" << i << std::endl; JsSetCurrentContext(context); JsValueRef fn; JsPropertyIdRef prop_id; JsCreatePropertyId("foo", 3, &prop_id); JsGetProperty(module, prop_id, &fn); JsValueRef undefined; JsGetUndefinedValue(&undefined); JsValueRef args[] = {undefined}; JsValueRef ret; JsCallFunction(fn, args, 1, &ret); JsSetCurrentContext(JS_INVALID_REFERENCE); } } ``` When I run the program it gets to iteration 200 or so and then terminates with error code "1073807364". The unbelievable thing is that I can replace the actual JS script with some fairly arbitrarily complicated code and everything works fine. There is something in particular about operating on the result of Math.cos (even multiplying by 0) that causes the crash. I can reproduce the value by replacing Math.cos(0.5) with Math.sin(0.5) or Math.sin(0.1) but if I actually hard-code the result of these functions I don't get the premature termination. I'm on Windows 10 and linking to Chakra with a vcpkg installation.
BUG: Math.cos and Math.sin function cause crash
https://api.github.com/repos/chakra-core/ChakraCore/issues/5725/comments
10
2018-09-24T18:22:29Z
2018-09-28T21:16:49Z
https://github.com/chakra-core/ChakraCore/issues/5725
363,264,758
5,725
[ "chakra-core", "ChakraCore" ]
**Note I am intending to fix this bug as part of the pull request I'm working on to implement a stable array sort.** Opening this issue as a reminder/record and also in case my upcoming pull request can't be accepted for some reason. With the current Array.prototype.sort method in ChakraCore if an array-like object with missing properties has the sort method called on it ChakraCore will fill the holes by copying from the array prototype if it has applicable values on it. **Including if the array-like object is not an instance of Array and does not inherit from the array prototype.** ```js Array.prototype[1] = 321; var o = {}; o[0] = 10; o.length = 3; o.sort = Array.prototype.sort; o.join = Array.prototype.join; o.toString = Array.prototype.toString; print (o.sort().toString()); ``` eshost output: ``` #### ChakraCore v1.11 10,321, #### SpiderMonkey 10,, #### ChakraCore master 10,321, #### V8 --harmony 10,, #### JavaScriptCore 10,, ``` Additionally this incorrect behaviour is currently tested in es5/defineIndexProperty.js as test_321_i.
BUG: Array prototype values copied to non-array when using sort
https://api.github.com/repos/chakra-core/ChakraCore/issues/5719/comments
0
2018-09-21T23:49:51Z
2018-11-01T19:05:48Z
https://github.com/chakra-core/ChakraCore/issues/5719
362,805,644
5,719
[ "chakra-core", "ChakraCore" ]
I'm wondering if there's a JSRT API function for creating a [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) object from native code? I could create the target and handler objects from JSRT APIs, but I don't see a way to do the equivalent of "new Proxy(target, handler)" using JSRT APIs. Thanks, Chris
JSRT API for creating a Proxy?
https://api.github.com/repos/chakra-core/ChakraCore/issues/5718/comments
2
2018-09-21T14:39:59Z
2018-10-09T23:23:55Z
https://github.com/chakra-core/ChakraCore/issues/5718
362,645,214
5,718
[ "chakra-core", "ChakraCore" ]
Hey, is there an easy way to expose GC from withing a script in ch? I'd like to run a js script that contains a statement - 'gc();' and that this statement will run a GC cycle.
Exposing GarbageCollection (GC) in ch binary
https://api.github.com/repos/chakra-core/ChakraCore/issues/5715/comments
4
2018-09-20T19:26:18Z
2018-09-20T20:21:30Z
https://github.com/chakra-core/ChakraCore/issues/5715
362,330,871
5,715
[ "chakra-core", "ChakraCore" ]
Hey folks, Recently I've been trying to build ChakraCore for some dynamic analysis experiments and I have been running into build issues. I've installed all of the dependencies, but running ./build.sh gives me a linking error, specifically: > Run Build Command:"/usr/bin/ninja" "cmTC_2d072" > > [1/2] Building CXX object CMakeFiles/cmTC_2d072.dir/testCXXCompiler.cxx.o > > [2/2] Linking CXX executable cmTC_2d072 > > FAILED: : && /usr/bin/clang++ > CMakeFiles/cmTC_2d072.dir/testCXXCompiler.cxx.o -o cmTC_2d072 -rdynamic && > : > > /usr/bin/ld: cannot find -lstdc++ > > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > ninja: build stopped: subcommand failed. I have tried a few things to work around this: - Adding -stdlib=stdc++ to command line option in CMake - Using ninja - Updating clang/lllvm/libc++ - Setting my library path to where libstdc++.so.6 lives - Symlinking libstdc++ to where libstdc++.so.6 lives Symlinking libstc++ fixes the linker problem, but then I get build issues for a lot of files: > ../../pal/inc/safemath.h:41:10: fatal error: 'type_traits' file not found > #include <type_traits> Has anyone had build experiences like this before? I appreciate your time and patience and appreciate any assistance. Thanks
Build issues with Ubuntu 16.04
https://api.github.com/repos/chakra-core/ChakraCore/issues/5705/comments
11
2018-09-14T20:13:19Z
2018-09-18T18:40:15Z
https://github.com/chakra-core/ChakraCore/issues/5705
360,439,595
5,705