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" ]
the following poc cause a assertion failure in "debug" build on ubuntu. ``` const v3 = new Int32Array(65537); const v4 = "replace".localeCompare(...v3); ```
Assertion failure in CallInfo.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6772/comments
2
2021-12-24T11:07:08Z
2022-01-31T22:45:37Z
https://github.com/chakra-core/ChakraCore/issues/6772
1,088,320,759
6,772
[ "chakra-core", "ChakraCore" ]
the following poc cause a assertion failure in "debug" build on ubuntu. ``` function v0(v1,v2) { } function v3(v4,v5) { } const v8 = [65537,v3,-2609076265,-2609076265]; const v9 = v0.bind(); v9.__proto__ = v8; const v10 = delete v9.length; v9[-1956872956] >>>= 65537; with (v9) { length = v10; } ```
Assertion failure in PathTypeHandler.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6771/comments
1
2021-12-24T11:05:36Z
2022-01-31T15:56:28Z
https://github.com/chakra-core/ChakraCore/issues/6771
1,088,319,904
6,771
[ "chakra-core", "ChakraCore" ]
the following poc cause a assertion failure in "debug" build on ubuntu. ``` function opt(){ const v2 = [-1000000000.0]; v2.length = 4294967295; const v3 = v2.copyWithin(); return v3; } for(let i=0;i<0x200;i++){ opt(false); } ```
Assertion failure in JavascriptArray.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6770/comments
7
2021-12-24T11:02:07Z
2024-08-01T14:29:34Z
https://github.com/chakra-core/ChakraCore/issues/6770
1,088,317,992
6,770
[ "chakra-core", "ChakraCore" ]
Proposal https://github.com/tc39/proposal-array-grouping has reached stage 3 as of TC 39 meeting at December 2021. Also i want to implement this proposal.
Implement Stage 3 Proposal Array.prototype.groupBy
https://api.github.com/repos/chakra-core/ChakraCore/issues/6768/comments
2
2021-12-16T19:03:30Z
2022-02-03T07:34:55Z
https://github.com/chakra-core/ChakraCore/issues/6768
1,082,550,155
6,768
[ "chakra-core", "ChakraCore" ]
the following poc trigger a assertion failure in "debug" build on ubuntu. ``` function opt(opt_param){ class V2 { print() { if (opt_param) { } } }; if (opt_param) { } const v12 = []; const v19 = {constructor:parseFloat}; v12.constructor = RangeError; v19.valueOf = parseFloat; } for(let i=0;i<0x200;i++){opt(false);} ``` #0 0x00005555568c8420 in Lowerer::MapStFldHelper (this=0x7ff7efffd7b0, propertySymOpnd=0x7ff7f4304eb8, helperMethod=@0x7ff7efffc094: IR::HelperOp_InitClassMember, polymorphicHelperMethod=@0x7ff7efffc090: IR::HelperOp_InitClassMember) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Lower.cpp:7221 #1 0x0000555556889c4b in Lowerer::LowerStFld (this=0x7ff7efffd7b0, stFldInstr=0x7ff7f43093f0, helperMethod=IR::HelperOp_InitClassMember, polymorphicHelperMethod=IR::HelperOp_InitClassMember, withInlineCache=false, labelBailOut=0x0, isHelper=false, withPutFlags=false, flags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Lower.cpp:7101 #2 0x0000555556887c77 in Lowerer::LowerRange (this=0x7ff7efffd7b0, instrStart=0x7ff7f4302170, instrEnd=0x7ff7f43021d0, defaultDoFastPath=true, defaultDoLoopFastPath=true) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Lower.cpp:2562 #3 0x000055555687d5a1 in Lowerer::Lower (this=0x7ff7efffd7b0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Lower.cpp:104 #4 0x0000555556b28bbb in Func::TryCodegen (this=0x7ff7efffdfa0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:475 #5 0x0000555556b28330 in Func::Codegen (alloc=0x7ff7efffe560, workItem=0x7ff7f42f1030, threadContextInfo=0x555557ebeea8, scriptContextInfo=0x555557ef0d08, outputData=0x7ff7efffe9a0, epInfo=0x7ff7f43c8090, runtimeInfo=0x0, polymorphicInlineCacheInfo=0x7ff7f432a540, codeGenAllocators=0x555557ef52d8, codeGenProfiler=0x0, isBackgroundJIT=true) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:325 #6 0x000055555694bdc0 in NativeCodeGenerator::CodeGen (this=0x555557ef24d8, pageAllocator= 0x5555575a9da8, workItemData=0x555557f01d30, jitWriteData=..., foreground=false, epInfo=0x7ff7f43c8090) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:890 #7 0x000055555694da58 in NativeCodeGenerator::CodeGen (this=0x555557ef24d8, pageAllocator=0x5555575a9da8, workItem=0x555557f01d08, foreground=false) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1007 #8 0x0000555556950854 in NativeCodeGenerator::Process (this=0x555557ef24d8, job=0x555557f01d10, threadData=0x5555575a9d88) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1907 #9 0x00005555569bc7a1 in JsUtil::BackgroundJobProcessor::Process (this=0x555557ef2658, job=0x555557f01d10, threadData=0x5555575a9d88) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1037 #10 0x00005555569bcda4 in JsUtil::BackgroundJobProcessor::Run (this=0x555557ef2658, threadData=0x5555575a9d88) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1135 #11 0x00005555569ba351 in JsUtil::BackgroundJobProcessor::StaticThreadProc (lpParam=0x5555575a9d88) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1319 #12 0x00005555558308d0 in CorUnix::CPalThread::ThreadEntry (pvParam=0x555557ef2dd0) at /home/zhunki/workspace/ChakraCore-master/pal/src/thread/pal_thread.cpp:1605 #13 0x00007ffff7aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #14 0x00007ffff7857293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Assertion failure in Lowerer::MapStFldHelper
https://api.github.com/repos/chakra-core/ChakraCore/issues/6767/comments
1
2021-12-14T12:24:44Z
2022-01-31T07:56:30Z
https://github.com/chakra-core/ChakraCore/issues/6767
1,079,695,504
6,767
[ "chakra-core", "ChakraCore" ]
the following poc trigger a assertion faliure in "debug" build on ubuntu. ``` ch -maxinterpretcount:10 -maxsimplejitruncount:100 -bgjit- poc.js ``` ``` function v0() { let v3 = 0; do { let v4 = -186432755; v4 %= v4; } while (v3 !== v3); v3 += v3; } for (let index = 0; index < 10000; index++) { v0() } ``` #0 0x0000555556d6714d in DbCheckPostLower::Check (this=0x7fffffff7810) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/DbCheckPostLower.cpp:81 #1 0x0000555556b2bfbd in Func::EndPhase (this=0x7fffffff8980, tag=Js::LowererPhase, dump=true) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:1364 #2 0x000055555686fdf7 in AutoCodeGenPhase::~AutoCodeGenPhase (this=0x7fffffff8180) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.h:1143 #3 0x0000555556b28bf3 in Func::TryCodegen (this=0x7fffffff8980) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:476 #4 0x0000555556b28330 in Func::Codegen (alloc=0x7fffffff8f40, workItem=0x7ff7f4374030, threadContextInfo=0x555557ebeed8, scriptContextInfo=0x555557ef0d88, outputData=0x7fffffff9380, epInfo=0x7ff7f43e4280, runtimeInfo=0x0, polymorphicInlineCacheInfo=0x7ff7f43bf400, codeGenAllocators=0x555557efd6f8, codeGenProfiler=0x0, isBackgroundJIT=false) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:325 #5 0x000055555694bdc0 in NativeCodeGenerator::CodeGen (this=0x555557ef2558, pageAllocator= 0x555557ebf260, workItemData=0x555557f05ad0, jitWriteData=..., foreground=true, epInfo=0x7ff7f43e4280) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:890 #6 0x000055555694da58 in NativeCodeGenerator::CodeGen (this=0x555557ef2558, pageAllocator=0x555557ebf260, workItem=0x555557f05aa8, foreground=true) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1007 #7 0x00005555569507d7 in NativeCodeGenerator::Process (this=0x555557ef2558, job=0x555557f05ab0, threadData=0x0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1895 #8 0x00005555569b9804 in JsUtil::ForegroundJobProcessor::Process (job=0x555557f05ab0) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:426 #9 0x000055555695f9f3 in JsUtil::ForegroundJobProcessor::PrioritizeJobAndWait<NativeCodeGenerator, Js::EntryPointInfo*> (this=0x555557ef26d8, manager=0x555557ef2558, holder=0x7ff7f43e4280,
Assertion failure in in DbCheckPostLower::Check
https://api.github.com/repos/chakra-core/ChakraCore/issues/6766/comments
0
2021-12-14T11:41:55Z
2022-01-31T07:35:40Z
https://github.com/chakra-core/ChakraCore/issues/6766
1,079,654,647
6,766
[ "chakra-core", "ChakraCore" ]
the following poc will cause a assertion failure in "debug" build on ubuntu. ``` function opt() { const v3 = delete opt.length; for (const v4 in opt) { } } opt(); opt(); ``` #0 0x00005555565cd77c in Js::SimpleTypeHandler<3ul>::DeleteProperty (this=0x7ff7f43f6780, instance=0x7ff7f43f6730, propertyId=209, propertyOperationFlags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Types/SimpleTypeHandler.cpp:664 #1 0x00005555564da2f3 in Js::DynamicObject::DeleteProperty (this=0x7ff7f43f6730, propertyId=209, flags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Types/DynamicType.cpp:336 #2 0x00005555561d7c5e in Js::JavascriptFunction::DeleteProperty (this=0x7ff7f43f6730, propertyId=209, flags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Library/JavascriptFunction.cpp:3055 #3 0x0000555556053098 in Js::JavascriptOperators::DeleteProperty_Impl<false> (instance= 0x7ff7f43f6730, propertyId=209, propertyOperationFlags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/JavascriptOperators.cpp:3130 #4 0x00005555560323b1 in Js::JavascriptOperators::DeleteProperty (instance=0x7ff7f43f6730, propertyId=209, propertyOperationFlags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/JavascriptOperators.cpp:3074 #5 0x0000555556032571 in Js::JavascriptOperators::OP_DeleteProperty (instance=0x7ff7f43f6730, propertyId=209, scriptContext=0x555557ef0c68, propertyOperationFlags=Js::PropertyOperation_None) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/JavascriptOperators.cpp:3149 #6 0x0000555555fb9421 in Js::InterpreterStackFrame::OP_DeleteFld<Js::OpLayoutT_ElementC<Js::LayoutSizePolicy<(Js::LayoutSize)0> > __unaligned>(Js::OpLayoutT_ElementC<Js::LayoutSizePolicy<(Js::LayoutSize)0> > __unaligned const __unaligned*) (this=0x7fffffffae30, playout=0x7ff7f4c540cb) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/InterpreterStackFrame.cpp:7674 #7 0x0000555555eb2b3d in Js::InterpreterStackFrame::ProcessProfiled (this=0x7fffffffae30) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/InterpreterHandler.inl:191 #8 0x0000555555e53ee2 in Js::InterpreterStackFrame::Process (this=0x7fffffffae30) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/InterpreterStackFrame.cpp:3472 #9 0x0000555555e52ba3 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ff7f43f6730, args=..., returnAddress=0x7ff7f4350f9a, addressOfReturnAddress=0x7fffffffb3c8, asmJsReturn=0x0) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/InterpreterStackFrame.cpp:2153 #10 0x0000555555e51c80 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7fffffffb3e0) at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Language/InterpreterStackFrame.cpp:1833 #11 0x00007ff7f4350f9a in ?? () #12 0x00007fffffffb400 in ?? () #13 0x00005555564a755e in amd64_CallFunction () at /home/zhunki/workspace/ChakraCore-master/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 Backtrace stopped: frame did not save the PC
assertion failure in Js::SimpleTypeHandler<3ul>::DeleteProperty
https://api.github.com/repos/chakra-core/ChakraCore/issues/6765/comments
1
2021-12-14T10:03:36Z
2022-01-22T10:44:54Z
https://github.com/chakra-core/ChakraCore/issues/6765
1,079,551,380
6,765
[ "chakra-core", "ChakraCore" ]
the following poc cause a assertion failure in "debug" build on ubuntu. ``` function v0(v1,v2) { const v3 = v0 != v0; try { const v5 = Object(); do { } while (v5 > 4); } finally { } const v7 = v0(); } const v8 = v0(); ``` #0 0x0000555556d3d49a in BackwardPass::ProcessBailOutInfo (this=0x7ff7ef7fbc10, instr=0x7ff7f428dba0, bailOutInfo=0x7ff7f428da80) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/BackwardPass.cpp:2696 #1 0x0000555556d3d084 in BackwardPass::ProcessBailOutInfo (this=0x7ff7ef7fbc10, instr=0x7ff7f428dba0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/BackwardPass.cpp:2195 #2 0x0000555556d381fa in BackwardPass::ProcessBlock (this=0x7ff7ef7fbc10, block=0x7ff7f4287288) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/BackwardPass.cpp:3024 #3 0x0000555556d30c5b in BackwardPass::OptBlock (this=0x7ff7ef7fbc10, block=0x7ff7f4287288) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/BackwardPass.cpp:1711 #4 0x0000555556d306bf in BackwardPass::Optimize (this=0x7ff7ef7fbc10) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/BackwardPass.cpp:430 #5 0x0000555556b47094 in GlobOpt::BackwardPass (this=0x7ff7ef7fc8f0, tag=Js::DeadStorePhase) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/GlobOpt.cpp:159 #6 0x0000555556b473b9 in GlobOpt::Optimize (this=0x7ff7ef7fc8f0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/GlobOpt.cpp:212 #7 0x0000555556b28afb in Func::TryCodegen (this=0x7ff7ef7fcfa0) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:457 #8 0x0000555556b28330 in Func::Codegen (alloc=0x7ff7ef7fd560, workItem=0x7ff7f4271030, threadContextInfo=0x555557ebee58, scriptContextInfo=0x555557ef0cb8, outputData=0x7ff7ef7fd9a0, epInfo= 0x7ff7f43c8120, runtimeInfo=0x0, polymorphicInlineCacheInfo=0x7ff7f4348d20, codeGenAllocators=0x555557ef5288, codeGenProfiler=0x0, isBackgroundJIT=true) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/Func.cpp:325 #9 0x000055555694bdc0 in NativeCodeGenerator::CodeGen (this=0x555557ef2488, pageAllocator=0x555557ef39a8, workItemData=0x555557f055b0, jitWriteData=..., foreground=false, epInfo=0x7ff7f43c8120) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:890 #10 0x000055555694da58 in NativeCodeGenerator::CodeGen (this=0x555557ef2488, pageAllocator=0x555557ef39a8, workItem=0x555557f05588, foreground=false) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1007 #11 0x0000555556950854 in NativeCodeGenerator::Process (this=0x555557ef2488, job=0x555557f05590, threadData=0x555557ef3988) at /home/zhunki/workspace/ChakraCore-master/lib/Backend/NativeCodeGenerator.cpp:1907 #12 0x00005555569bc7a1 in JsUtil::BackgroundJobProcessor::Process (this=0x555557ef2608, job=0x555557f05590, threadData=0x555557ef3988) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1037 #13 0x00005555569bcda4 in JsUtil::BackgroundJobProcessor::Run (this=0x555557ef2608, threadData=0x555557ef3988) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1135 #14 0x00005555569ba351 in JsUtil::BackgroundJobProcessor::StaticThreadProc (lpParam=0x555557ef3988) at /home/zhunki/workspace/ChakraCore-master/lib/Common/Common/Jobs.cpp:1319 #15 0x00005555558308d0 in CorUnix::CPalThread::ThreadEntry (pvParam=0x555557ef3d80) at /home/zhunki/workspace/ChakraCore-master/pal/src/thread/pal_thread.cpp:1605 #16 0x00007ffff7aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #17 0x00007ffff7857293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Assertion failure in in BackwardPass::ProcessBailOutInfo
https://api.github.com/repos/chakra-core/ChakraCore/issues/6764/comments
0
2021-12-14T10:00:44Z
2022-01-22T10:22:39Z
https://github.com/chakra-core/ChakraCore/issues/6764
1,079,547,129
6,764
[ "chakra-core", "ChakraCore" ]
the following poc cause a crash in latest build on ubuntu. ``` for (let v3 = -65537; v3 < 3; v3 = v3 + 0) { const v4 = v3++; } ``` #0 0x0000555555799691 in ReportFatalException () #1 0x0000555555799877 in Js::Throw::FatalInternalError(int) () #2 0x0000555555d543a7 in GlobOpt::CollectMemOpInfo(IR::Instr*, IR::Instr*, Value*, Value*) () #3 0x0000555555d4bf0e in GlobOpt::OptInstr(IR::Instr*&, bool*) () #4 0x0000555555d49e13 in GlobOpt::OptBlock(BasicBlock*) () #5 0x0000555555d48f49 in GlobOpt::ForwardPass() () #6 0x0000555555d4889b in GlobOpt::Optimize() () #7 0x0000555555d4155f in Func::TryCodegen() () #8 0x0000555555d4125c in Func::Codegen(Memory::JitArenaAllocator*, JITTimeWorkItem*, ThreadContextInfo*, ScriptContextInfo*, JITOutputIDL*, Js::EntryPointInfo*, FunctionJITRuntimeInfo const*, JITTimePolymorphicInlineCacheInfo*, void*, Js::ScriptContextProfiler*, bool) () #9 0x0000555555cc0e29 in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItemIDL*, JITOutputIDL&, bool, Js::EntryPointInfo*) () #10 0x0000555555cc10cd in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItem*, bool) () #11 0x0000555555cc1953 in NativeCodeGenerator::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) () #12 0x0000555555cd4a0e in JsUtil::BackgroundJobProcessor::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) () #13 0x0000555555cd4b15 in JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData*) () #14 0x0000555555cd3a47 in JsUtil::BackgroundJobProcessor::StaticThreadProc(void*) () #15 0x000055555571f9fd in CorUnix::CPalThread::ThreadEntry(void*) () #16 0x00007ffff7aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #17 0x00007ffff7857293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Running out of memory when creating constants in a loop
https://api.github.com/repos/chakra-core/ChakraCore/issues/6763/comments
6
2021-12-14T09:52:02Z
2022-01-31T07:28:32Z
https://github.com/chakra-core/ChakraCore/issues/6763
1,079,538,547
6,763
[ "chakra-core", "ChakraCore" ]
the following poc will crash the latest build on ubuntu. ``` function opt() { let v4 = 9; for (let v5 = 0; v5 < v4; v5 = v5 / v4) { v4 = v5; } const v6 = v4--; } for(i = 0;i < 1000; i++){ opt(); } ``` #0 0x0000555555e96e6d in BackwardPass::ReverseCopyProp(IR::Instr*) () #1 0x0000555555e90fb5 in BackwardPass::ProcessBlock(BasicBlock*) () #2 0x0000555555e8d66d in BackwardPass::OptBlock(BasicBlock*) () #3 0x0000555555e8cf1e in BackwardPass::Optimize() () #4 0x0000555555d485ca in GlobOpt::BackwardPass(Js::Phase) () #5 0x0000555555d488a8 in GlobOpt::Optimize() () #6 0x0000555555d4155f in Func::TryCodegen() () #7 0x0000555555d4125c in Func::Codegen(Memory::JitArenaAllocator*, JITTimeWorkItem*, ThreadContextInfo*, ScriptContextInfo*, JITOutputIDL*, Js::EntryPointInfo*, FunctionJITRuntimeInfo const*, JITTimePolymorphicInlineCacheInfo*, void*, Js::ScriptContextProfiler*, bool) () #8 0x0000555555cc0e29 in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItemIDL*, JITOutputIDL&, bool, Js::EntryPointInfo*) () #9 0x0000555555cc10cd in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItem*, bool) () #10 0x0000555555cc1953 in NativeCodeGenerator::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) () #11 0x0000555555cd4a0e in JsUtil::BackgroundJobProcessor::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) () #12 0x0000555555cd4b15 in JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData*) () #13 0x0000555555cd3a47 in JsUtil::BackgroundJobProcessor::StaticThreadProc(void*) () #14 0x000055555571f9fd in CorUnix::CPalThread::ThreadEntry(void*) () #15 0x00007ffff7aa2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #16 0x00007ffff7857293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
crash in BackwardPass::ReverseCopyProp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6762/comments
1
2021-12-14T09:47:26Z
2022-01-22T10:20:28Z
https://github.com/chakra-core/ChakraCore/issues/6762
1,079,533,868
6,762
[ "chakra-core", "ChakraCore" ]
https://github.com/chakra-core/ChakraCore/blob/b6042191545a823fcf9d53df2b09d160d5808f51/lib/Jsrt/ChakraCore.h#L1444 Parameters miss match in Signature from XML decription.
JsObjectDefinePropertyFull XML doc is invalid
https://api.github.com/repos/chakra-core/ChakraCore/issues/6761/comments
0
2021-11-26T14:37:47Z
2021-11-26T14:37:47Z
https://github.com/chakra-core/ChakraCore/issues/6761
1,064,544,576
6,761
[ "chakra-core", "ChakraCore" ]
I'm working on a project which use ChakraCore as a library with cmake. However, an error occurred. Platform: Windows + Microsoft Visual Studio 2017 + CMake. Code: ```cmake add_subdirectory(chakra-core) include_directories(chakra-core/lib/) include_directories(chakra-core/lib/Jsrt) include_directories(chakra-core/lib/Runtime) ``` CommandLine: ````bash F:\Repos\Tode\build>d:\sdk\cmake-3.14.0-win32-x86\bin\cmake . CMake Error at core/engine/chakra-core/CMakeLists.txt:63 (message): Unsupported target processor: AMD64 -- Configuring incomplete, errors occurred! See also "F:/Repos/Tode/build/CMakeFiles/CMakeOutput.log". ```
Unsupported target processor: AMD64
https://api.github.com/repos/chakra-core/ChakraCore/issues/6760/comments
4
2021-11-17T14:28:18Z
2023-03-24T10:06:49Z
https://github.com/chakra-core/ChakraCore/issues/6760
1,056,197,302
6,760
[ "chakra-core", "ChakraCore" ]
SInce Microsoft has ended support for CC a while ago i think we should update README.md to remove the notice about support from Microsoft or update it. I want to fix this and If you may trust me in doing this, may i ask you a question - Do you still accept security issues for 1.11 release?
Update README.md since Microsoft ended support for CC
https://api.github.com/repos/chakra-core/ChakraCore/issues/6757/comments
2
2021-11-05T18:46:39Z
2021-11-06T19:16:11Z
https://github.com/chakra-core/ChakraCore/issues/6757
1,046,142,781
6,757
[ "chakra-core", "ChakraCore" ]
Meta issue for various tasks related to the upcoming release.
Release 1.12 preparation
https://api.github.com/repos/chakra-core/ChakraCore/issues/6753/comments
4
2021-11-03T06:54:26Z
2021-11-07T00:24:03Z
https://github.com/chakra-core/ChakraCore/issues/6753
1,043,141,077
6,753
[ "chakra-core", "ChakraCore" ]
### Version: ch version 1.12.0.0-beta ### PoC: ```js let args = new Array(0x10000); args.fill(); args = args.map((_, i) => 'a' + i).join(', '); let gun = eval(`(function () { class A { } class B extends A { constructor(${args}) { () => { ${args}; super(); }; class C { constructor() { } trigger() { (() => { super.x; })(); } } return new C(); } } return new B(); })()`); for (let i = 0; i < 0x10000; i++) gun.trigger(); ``` ### Command 1: ``` ./build.sh ~/ChakraCore/out/Release/ch PoC.js ``` ### Output 1: ``` Aborted (core dumped) ``` ### Backtrace (using gdb debugging) 1: ``` gdb -q -args ~/ChakraCore/out/Release/ch PoC.js (gdb) r Starting program:~/ChakraCore/out/Release/ch PoC.js [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ff7f380f700 (LWP 5027)] [New Thread 0x7ff7f2fdf700 (LWP 5028)] [New Thread 0x7ff7f27de700 (LWP 5029)] Thread 1 "ch" received signal SIGILL, Illegal instruction. 0x00007ffff4140eb1 in ReportFatalException () (gdb) bt #0 0x00007ffff4140eb1 in ReportFatalException () #1 0x00007ffff4140fb9 in OutOfMemory_unrecoverable_error() () #2 0x00007ffff4193fac in Js::Exception::RaiseIfScriptActive(Js::ScriptContext*, unsigned int, void*) () #3 0x00007ffff4141159 in Js::Throw::OutOfMemory() () #4 0x00007ffff41341e9 in Math::DefaultOverflowPolicy() () #5 0x00007ffff4206090 in PreVisitFunction(ParseNodeFnc*, ByteCodeGenerator*, Js::ParseableFunctionInfo*) () #6 0x00007ffff420be94 in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #7 0x00007ffff420bc7c in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #8 0x00007ffff420bc7c in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #9 0x00007ffff420bc7c in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #10 0x00007ffff420bff5 in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #11 0x00007ffff420bc7c in void VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), unsigned int*, bool) () #12 0x00007ffff420a00d in void Visit<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)>(ParseNode*, ByteCodeGenerator*, void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*), ParseNode*) () #13 0x00007ffff4203a70 in ByteCodeGenerator::Generate(ParseNodeProg*, unsigned int, ByteCodeGenerator*, Js::ParseableFunctionInfo**, unsigned int, bool, Parser*, Js::ScriptFunction**) () #14 0x00007ffff42054af in GenerateByteCode(ParseNodeProg*, unsigned int, Js::ScriptContext*, Js::ParseableFunctionInfo**, unsigned int, bool, Parser*, CompileScriptException*, Js::ScopeInfo*, Js::ScriptFunction**) () #15 0x00007ffff43c9d94 in Js::GlobalObject::DefaultEvalHelper(Js::ScriptContext*, char16_t const*, int, unsigned int, unsigned int, char16_t const*, int, int, int) () #16 0x00007ffff43ca9c2 in Js::GlobalObject::VEval(Js::JavascriptLibrary*, Js::FrameDisplay*, unsigned int, bool, bool, Js::Arguments&, bool, bool, unsigned int, Js::ScriptContext*) () #17 0x00007ffff43cade2 in Js::GlobalObject::EntryEval(Js::RecyclableObject*, Js::CallInfo, ...) () #18 0x00007ffff45a6c0e in amd64_CallFunction () #19 0x00007ffff4350347 in void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) () #20 0x00007ffff4350120 in void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) () #21 0x00007ffff42fc537 in Js::InterpreterStackFrame::ProcessProfiled() () #22 0x00007ffff42d9d23 in Js::InterpreterStackFrame::Process() () #23 0x00007ffff42d94fb in Js::InterpreterStackFrame::InterpreterHelper(Js::ScriptFunction*, Js::ArgumentReader, void*, void*, Js::InterpreterStackFrame::AsmJsReturnStruct*) () #24 0x00007ffff42d8fb5 in Js::InterpreterStackFrame::InterpreterThunk(Js::JavascriptCallStackLayout*) () #25 0x00007ff7f1f30fa2 in ?? () #26 0x00007fffffffcce0 in ?? () #27 0x00007ffff45a6c0e in amd64_CallFunction () ``` ### Command 2: ``` ./build.sh -b -j ~/ChakraCore/out/Debug/ch PoC.js ``` ### Output 2: ``` Aborted (core dumped) ``` ### Backtrace (using gdb debugging) 2: ``` gdb -q -args ~/ChakraCore/out/Debug/ch PoC.js (gdb) r Starting program: ~/ChakraCore/out/Debug/ch PoC.js [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ff7f229f700 (LWP 14422)] [New Thread 0x7ff7f1a6f700 (LWP 14423)] [New Thread 0x7ff7f126e700 (LWP 14424)] Thread 1 "ch" received signal SIGTRAP, Trace/breakpoint trap. DBG_DebugBreak () (gdb) bt #0 DBG_DebugBreak () at ~/ChakraCore/pal/src/arch/i386/debugbreak.S:18 #1 0x00007ffff2a59001 in DebugBreak () at ~/ChakraCore/pal/src/debug/debug.cpp:408 #2 0x00007ffff30c8949 in ReportFatalException (context=0, exceptionCode=-2147024882, reasonCode=Fatal_OutOfMemory, scenario=9) at ~/ChakraCore/lib/Common/Exceptions/ReportError.cpp:20 #3 0x00007ffff30c8c96 in OutOfMemory_unrecoverable_error () at ~/ChakraCore/lib/Common/Exceptions/ReportError.cpp:145 #4 0x00007ffff323e800 in Js::Exception::RaiseIfScriptActive (scriptContext=0x0, kind=0, returnAddress=0x0) at ~/ChakraCore/lib/Runtime/Base/Exception.cpp:20 #5 0x00007ffff39d1b15 in JsUtil::ExternalApi::RaiseOutOfMemoryIfScriptActive () at ~/ChakraCore/lib/Runtime/Library/CommonExternalApiImpl.cpp:21 #6 0x00007ffff30c9378 in Js::Throw::OutOfMemory () at ~/ChakraCore/lib/Common/Exceptions/Throw.cpp:122 #7 0x00007ffff30a3f49 in Math::DefaultOverflowPolicy () at ~/ChakraCore/lib/Common/Common/MathUtil.cpp:37 #8 0x00007ffff33f5ddf in UInt16Math::Inc<void ()>(unsigned short&, void (&)()) (lhs=@0x7fffffff605e: 0, overflowFn=@0x7ffff30a3f40: {void (void)} 0x7ffff30a3f40 <Math::DefaultOverflowPolicy()>) at ~/ChakraCore/lib/Common/Common/UInt16Math.h:32 #9 0x00007ffff33f5d9c in UInt16Math::Inc (lhs=@0x7fffffff605e: 0) at ~/ChakraCore/lib/Common/Common/UInt16Math.h:53 #10 0x00007ffff33ee26c in PreVisitFunction(ParseNodeFnc*, ByteCodeGenerator*, Js::ParseableFunctionInfo*)::$_1::operator()(ParseNode*) const (this=0x7fffffff5f58, pnode=0x7ff7e2b4a150) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2534 #11 0x00007ffff33ee234 in _Z14MapFormalsImplIZ16PreVisitFunctionP12ParseNodeFncP17ByteCodeGeneratorPN2Js21ParseableFunctionInfoEE3$_1Lb0EEvS1_T_ (pnodeFunc=0x7ff7e3f59340, fn=...) at ~/ChakraCore/lib/Runtime/../Parser/FormalsUtil.h:11 #12 0x00007ffff33e64b5 in MapFormalsWithoutRest<PreVisitFunction(ParseNodeFnc*, ByteCodeGenerator*, Js::ParseableFunctionInfo*)::$_1>(ParseNodeFnc*, PreVisitFunction(ParseNodeFnc*, ByteCodeGenerator*, Js::ParseableFunctionInfo*)::$_1) (pnodeFunc=0x7ff7e3f59340, fn=...) at ~/ChakraCore/lib/Runtime/../Parser/FormalsUtil.h:22 #13 0x00007ffff33e60b9 in PreVisitFunction (pnodeFnc=0x7ff7e3f59340, byteCodeGenerator=0x7fffffff7618, reuseNestedFunc=0x0) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2534 #14 0x00007ffff33fbf02 in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f59340, pnodeParent=0x7ff7e3f58300, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff6f5c, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3379 #15 0x00007ffff33fc7bf in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f58a30, pnodeParent=0x7ff7e3f58300, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff6f5c, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3499 #16 0x00007ffff33fc7bf in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f58870, pnodeParent=0x7ff7e3f58300, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff6f5c, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3499 #17 0x00007ffff33fc7bf in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f586d0, pnodeParent=0x7ff7e3f58300, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff6f5c, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3499 #18 0x00007ffff33fc293 in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f58300, pnodeParent=0x7ff7e3f58030, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff73a0, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3426 #19 0x00007ffff33fc7bf in VisitNestedScopes<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnodeScopeList=0x7ff7e3f58260, pnodeParent=0x7ff7e3f58030, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pIndex=0x7fffffff73a0, breakOnBodyScope=false) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:3499 #20 0x00007ffff33f1946 in Visit<void (*)(ParseNode*, ByteCodeGenerator*), void (*)(ParseNode*, ByteCodeGenerator*)> (pnode=0x7ff7e3f58030, byteCodeGenerator=0x7fffffff7618, prefix=0x7ffff33e1950 <Bind(ParseNode*, ByteCodeGenerator*)>, postfix=0x7ffff33e2410 <AssignRegisters(ParseNode*, ByteCodeGenerator*)>, pnodeParent=0x0) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:341 #21 0x00007ffff33e0dde in ByteCodeGenerator::Generate (pnodeProg=0x7ff7e3f58030, grfscr=7226, byteCodeGenerator=0x7fffffff7618, ppRootFunc=0x7fffffff8698, sourceIndex=2, forceNoNative=false, parser=0x7fffffff7ac0, functionRef=0x0) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2042 #22 0x00007ffff33e4b5d in GenerateByteCode (pnode=0x7ff7e3f58030, grfscr=7226, scriptContext=0x5555561b4028, ppRootFunc=0x7fffffff8698, sourceIndex=2, forceNoNative=false, parser=0x7fffffff7ac0, pse=0x7fffffff86a0, parentScopeInfo=0x0, functionRef=0x0) at ~/ChakraCore/lib/Runtime/ByteCode/ByteCodeGenerator.cpp:2220 #23 0x00007ffff3a155b3 in Js::GlobalObject::DefaultEvalHelper (scriptContext=0x5555561b4028, source=0x7ff7e3b8b020 u"(function () {\n class A {\n }\n class B extends A {\n constructor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a"..., sourceLength=1026801, moduleID=0, grfscr=7226, pszTitle=0x7ffff4342b00 <Js::Constants::EvalCode> u"eval code", registerDocument=1, isIndirect=0, strictMode=0) at ~/ChakraCore/lib/Runtime/Library/GlobalObject.cpp:895 #24 0x00007ffff3a16c3e in Js::GlobalObject::VEval (library=0x7ff7f1a88000, environment=0x7ffff4bed8b0 <Js::NullFrameDisplay>, moduleID=0, strictMode=false, isIndirect=false, args=..., isLibraryCode=false, registerDocument=true, additionalGrfscr=0, debugEvalScriptContext=0x0) at ~/ChakraCore/lib/Runtime/Library/GlobalObject.cpp:609 #25 0x00007ffff3a167af in Js::GlobalObject::EntryEvalHelper (scriptContext=0x5555561b4028, function=0x7ff7f0a465c0, args=...) at ~/ChakraCore/lib/Runtime/Library/GlobalObject.cpp:519 #26 0x00007ffff3a174e8 in Js::GlobalObject::EntryEval (function=0x7ff7f0a465c0, callInfo=...) at ~/ChakraCore/lib/Runtime/Library/GlobalObject.cpp:549 #27 0x00007ffff3e1150e in amd64_CallFunction () at ~/ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #28 0x00007ffff3b0290e in Js::JavascriptFunction::CallFunction<true> (function=0x7ff7f0a465c0, entryPoint=0x7ffff3a172b0 <Js::GlobalObject::EntryEval(Js::RecyclableObject*, Js::CallInfo, ...)>, args=..., useLargeArgCount=false) at ~/ChakraCore/lib/Runtime/Library/JavascriptFunction.cpp:1364 #29 0x00007ffff38b1c4f in Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) (this=0x7fffffffbda0, playout=0x7ff7f09e80c4, function=0x7ff7f0a465c0, flags=10, spreadIndices=0x0) at ~/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3988 #30 0x00007ffff38b14d4 in Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) (this=0x7fffffffbda0, playout=0x7ff7f09e80c4, function=0x7ff7f0a465c0, flags=8, profileId=4, inlineCacheIndex=4294967295, spreadIndices=0x0) at ~/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4016 #31 0x00007ffff387a4b1 in Js::InterpreterStackFrame::OP_ProfiledCallIExtendedFlags<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIExtendedFlags<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > const __unaligned*) (this=0x7fffffffbda0, playout=0x7ff7f09e80c4) at ~/ChakraCore/lib/Runtime/./Language/InterpreterStackFrame.h:518 #32 0x00007ffff37204fe in Js::InterpreterStackFrame::ProcessProfiled (this=0x7fffffffbda0) at ~/ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:90 #33 0x00007ffff36af49d in Js::InterpreterStackFrame::Process (this=0x7fffffffbda0) at ~/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3472 #34 0x00007ffff36adfdb in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ff7f1a76730, args=..., returnAddress=0x7ff7f09c0fa2, addressOfReturnAddress=0x7fffffffc368, asmJsReturn=0x0) at ~/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2153 #35 0x00007ffff36ad0a8 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7fffffffc380) at ~/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1833 #36 0x00007ff7f09c0fa2 in ?? () #37 0x00007fffffffc390 in ?? () #38 0x00007ffff3e1150e in amd64_CallFunction () ```
Aborted (core dumped) in `ReportFatalException`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6752/comments
6
2021-10-30T08:18:29Z
2021-11-05T07:20:36Z
https://github.com/chakra-core/ChakraCore/issues/6752
1,040,085,751
6,752
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript (function () { // Scope for utility functions. var StringPrototypeValueOf = String.prototype.valueOf; var DatePrototypeValueOf = Date.prototype.valueOf; })(); var valueOfAccessed = "FAIL"; Date.prototype.valueOf = function () { valueOfAccessed = "PASS"; return " "; } var dateObj = new Date(2010, 11, 31, 0, 0, 0, 0); var dToJSON = dateObj.toJSON(); WScript.Echo(valueOfAccessed); ``` How to reproduce it: ```shell ./build.sh --no-jit -d -j ./ch poc.js ``` output ```shell FAIL ``` The True print is **PASS**, but get **FAIL**.
Get Error Output When Build with no-jit Mode
https://api.github.com/repos/chakra-core/ChakraCore/issues/6750/comments
3
2021-10-25T07:35:59Z
2021-11-25T11:25:20Z
https://github.com/chakra-core/ChakraCore/issues/6750
1,034,782,867
6,750
[ "chakra-core", "ChakraCore" ]
Why jot just in the Github releases tab, where the last release was posted in december 2020 if I'm correct. And why not when 1.12 is ready?
When/Where will releases be posted
https://api.github.com/repos/chakra-core/ChakraCore/issues/6749/comments
0
2021-10-11T18:53:35Z
2021-10-11T19:08:38Z
https://github.com/chakra-core/ChakraCore/issues/6749
1,023,017,656
6,749
[ "chakra-core", "ChakraCore" ]
This is a discussion to determine what should go into the next release w.r.t WebAssembly. We have updated the SIMD opcodes somewhat recently, and I am inclined to remove anything else that is not yet in from the upcoming release. Things among open issues that are worth noting, in my opinion: - #6524 - request to throw an exception when Wasm runs out of stack space, rather than just crashing. It is planned for the next release, but since we haven't gotten to it my feeling is that we should postpone it. - #6434 - getting us up to speed with Wasm SIMD. It is more or less a project, as it add new webassembly instructions, and requires some backend support. It is an important milestone in Wasm support, and CC has more than half of that functionality working already. - #6396 - obvious optimization of Wasm shuffles. It is needed in order to stop shuffles from being embarrassingly slow. - Other Wasm features ([project](https://github.com/chakra-core/ChakraCore/projects/1)) - longer term work.
WebAssembly release planning
https://api.github.com/repos/chakra-core/ChakraCore/issues/6742/comments
1
2021-09-07T23:59:06Z
2021-10-30T08:00:00Z
https://github.com/chakra-core/ChakraCore/issues/6742
990,453,896
6,742
[ "chakra-core", "ChakraCore" ]
Hello! I'm using chakraRT (in windows), but I also sometimes use chakracore in osx and linux (as well as jscore, both ios/osx natively and the open source one) I've recently re-enabled `JsStartDebugging()` and hurrah! visual studio 2017 now shows code! (It used to just show when there was an exception, but no source, debugging, no idea what made it start working) I've also implemented modules, via multiple contexts (in jscore and chakra). It all seems to be working fine, except I can only enable debugging for my first script.... Subsequent calls to `JsStartDebugging()` when creating my new context (which is during script execution of the parent-context) returns `JsErrorRuntimeInUse`. I've read on another issue, that's because a script is currently being executed... but I'm on a different current context (same vm), so should I really see the error? Does it need to be called outside of any script execution in the VM? the headers say `Starts debugging in the current context.` so I assume that's correct that debugging needs enabling per-context, not per-vm? My flow; `Create VM` `Create ContextA` - `Set ContextA active` - `Enable debugging (success)` - `Set no active context` `Bootup` - `Set ContextA active` - `Execute bootup.s script (imports ImportB.js)` - - `Create ContextB` - - `Set ContextB active` - - `Enable debugging (fails JsErrorRuntimeInUse)` - - `Execute ImportB.js` - - `Set ContextA active (popped from stack)` - - `Continue ContextA/script execution` - `Bootup.js/ContextA finishes - set no active context` `Run pending async jobs` (run on their respective contexts) Visual studio only shows the bootup script in the debugger, so, I guess it is context specific... I only ask as moving the debugger enabling is slightly awkward (but I can do it), but it does mean it's after the module initialisation, so I'd never be able to debug the actual import (but I can live with that) But I'm also not sure if I'm setting up debugging correctly for multiple contexts (Info about debugging is extremely rare!) Side note; if I'm doing multiple contexts incorrectly, do let me know! (should I switch active contexts this way?) JavascriptCore is threadsafe for JS calls, but not script execution, chakra seems to be similar, and working so far :)
JsStartDebugging on mutliple contexts (vs runtime) clarification
https://api.github.com/repos/chakra-core/ChakraCore/issues/6740/comments
2
2021-09-03T11:18:51Z
2021-09-03T21:48:15Z
https://github.com/chakra-core/ChakraCore/issues/6740
987,670,132
6,740
[ "chakra-core", "ChakraCore" ]
Following PoC causes a crash due to an assertion failure. ``` function jit() { let x = Math.round.call({}, 3133.7); } for (var i = 0; i < 0x1000; i++) { jit(); } ``` OS: Ubuntu 18.04 LTS Version: ch version 1.12.0.0-beta Compiler: clang-6 Commit: 4841a76a6a0c7c9c212846e8c96c8675ce7653da ## Release build (with ASAN) output ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==748==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000074 (pc 0x562bff38f152 bp 0x7efee9c1fce0 sp 0x7efee9c1fc80 T2) ==748==The signal is caused by a WRITE memory access. ==748==Hint: address points to the zero page. #0 0x562bff38f151 in SCCLiveness::ProcessStackSymUse(StackSym*, IR::Instr*, int) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1d3b151) #1 0x562bff38c6a0 in SCCLiveness::ProcessBailOutUses(IR::Instr*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1d386a0) #2 0x562bff38a26e in SCCLiveness::Build() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1d3626e) #3 0x562bff2693dc in LinearScan::RegAlloc() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1c153dc) #4 0x562bfef26d0e in Func::TryCodegen() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x18d2d0e) #5 0x562bfef25f00 in Func::Codegen(Memory::JitArenaAllocator*, JITTimeWorkItem*, ThreadContextInfo*, ScriptContextInfo*, JITOutputIDL*, Js::EntryPointInfo*, FunctionJITRuntimeInfo const*, JITTimePolymorphicInlineCacheInfo*, void*, Js::ScriptContextProfiler*, bool) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x18d1f00) #6 0x562bfeda1218 in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItemIDL*, JITOutputIDL&, bool, Js::EntryPointInfo*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x174d218) #7 0x562bfeda1990 in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItem*, bool) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x174d990) #8 0x562bfeda359d in NativeCodeGenerator::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x174f59d) #9 0x562bfedd67e3 in JsUtil::BackgroundJobProcessor::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x17827e3) #10 0x562bfedd6b40 in JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1782b40) #11 0x562bfedd2801 in JsUtil::BackgroundJobProcessor::StaticThreadProc(void*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x177e801) #12 0x562bfdab73d8 in CorUnix::CPalThread::ThreadEntry(void*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x4633d8) #13 0x7f06f05ae6b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9) #14 0x7f06ef9b951c in clone (/lib/x86_64-linux-gnu/libc.so.6+0x10751c) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1d3b151) in SCCLiveness::ProcessStackSymUse(StackSym*, IR::Instr*, int) Thread T2 created by T0 here: #0 0x562bfd9a0cfd in pthread_create /tmp/final/llvm.src/projects/compiler-rt/lib/asan/asan_interceptors.cc:204:3 #1 0x562bfdab62f1 in CorUnix::InternalCreateThread(CorUnix::CPalThread*, _SECURITY_ATTRIBUTES*, unsigned int, unsigned int (*)(void*), void*, unsigned int, CorUnix::PalThreadType, unsigned int*, void**) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x4622f1) #2 0x562bfdab5cda in CreateThread (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x461cda) #3 0x562bfedd200e in JsUtil::BackgroundJobProcessor::InitializeParallelThreadData(AllocationPolicyManager*, bool) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x177e00e) #4 0x562bfedd3108 in JsUtil::BackgroundJobProcessor::BackgroundJobProcessor(AllocationPolicyManager*, JsUtil::ThreadService*, bool) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x177f108) #5 0x562bfdd87ca1 in ThreadContext::GetJobProcessor() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x733ca1) #6 0x562bfed9da68 in NativeCodeGenerator::NativeCodeGenerator(Js::ScriptContext*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1749a68) #7 0x562bfed95108 in NewNativeCodeGenerator(Js::ScriptContext*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x1741108) #8 0x562bfdd42716 in Js::ScriptContext::Initialize() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x6ee716) #9 0x562bfdbc99b2 in JsrtContextCore::EnsureScriptContext() (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x5759b2) #10 0x562bfdbc96c5 in JsrtContextCore::New(JsrtRuntime*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x5756c5) #11 0x562bfdabe3ad in CreateContextCore(void*, TTD::TTDJsRTActionResultAutoRecorder&, bool, bool, bool, void**) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x46a3ad) #12 0x562bfdac1759 in JsCreateContext (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x46d759) #13 0x562bfd9eb54b in ExecuteTest(char const*) (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x39754b) #14 0x562bfd9ec876 in main (/home/ubuntu/jsengine/ChakraCore/out/Release/ch+0x398876) #15 0x7f06ef8d283f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) ==748==ABORTING ``` ## Debug build output ``` ASSERTION 843: (/home/ubuntu/jsengine/ChakraCore/lib/Backend/Sym.cpp, line 394) HasByteCodeRegSlot() Failure: (HasByteCodeRegSlot()) [1] 843 illegal hardware instruction ./out/Debug/ch x.js ```
Assertion Failure in SCCLiveness::ProcessStackSymUse
https://api.github.com/repos/chakra-core/ChakraCore/issues/6738/comments
3
2021-08-30T04:41:21Z
2021-09-08T21:47:05Z
https://github.com/chakra-core/ChakraCore/issues/6738
982,379,047
6,738
[ "chakra-core", "ChakraCore" ]
(tested with 1.11.24.0 on Mac OS) This is one of those "I went looking for dumb edge cases" bugs. It didn't come up in real code - it requires code to be _very_ poorly written - and should be prioritized accordingly. Anyway: ```js let evil = new RegExp; evil.exec = () => ({ 0: '1234567', length: 1, index: 0 }); 'abc'.replace(evil, `$'`); ``` and ```js let evil = new RegExp; evil.exec = () => ({ 0: 'x', length: 1, index: 3 }); print('abc'.replace(evil, `$'`)); ``` both produce `abcabc`. The correct results are the empty string and `abc` respectively. These exercise an extremely dumb case in [GetSubstitution](https://tc39.es/ecma262/multipage/text-processing.html#sec-getsubstitution): in the `$'` case, there is a `tailPos β‰₯ stringLength` condition. The strict `>` case there is very strange: it means that you have a match M at position P in string S such that the length of M exceeds the number of code units subsequent to P in S. Obviously this does not make sense, and indeed built-in RegExps can't do this (I am reasonably sure). But this can be achieved by overriding the `exec` method on a RegExp (something [we have not yet gotten rid of](https://github.com/tc39/proposal-rm-builtin-subclassing), unfortunately), either (in the first case) by producing a match string which is longer than the input or (in the second case) by producing a nonempty match string at position past where it could have fit in the input.
JS correctness issue when overriding RegExp .exec to be incoherent
https://api.github.com/repos/chakra-core/ChakraCore/issues/6736/comments
1
2021-08-08T06:45:36Z
2021-09-18T22:53:17Z
https://github.com/chakra-core/ChakraCore/issues/6736
963,367,323
6,736
[ "chakra-core", "ChakraCore" ]
> ![image](https://user-images.githubusercontent.com/37947786/126847640-da9ccf2c-6edc-4179-ac96-d9a50170a346.png)
Discord invitation in readme is invalid
https://api.github.com/repos/chakra-core/ChakraCore/issues/6734/comments
3
2021-07-23T22:34:23Z
2021-07-26T06:38:19Z
https://github.com/chakra-core/ChakraCore/issues/6734
951,934,454
6,734
[ "chakra-core", "ChakraCore" ]
Whilst it is now possible to build directly with cmake and skip the build.sh script altogether whilst we continue to provide it we should keep it functional... New versions of Ubuntu ship without Python2. Build.sh reference to Python2 for optional LLTng support; AND for setting a relative path and this can cause a build failure on Ubuntu 20 - as per @fatcerberus We should update build.sh to try checking for python 3 if python 2 is not found.
Build.sh may be broken on latest Ubuntu
https://api.github.com/repos/chakra-core/ChakraCore/issues/6731/comments
2
2021-07-10T16:32:23Z
2021-07-13T03:19:38Z
https://github.com/chakra-core/ChakraCore/issues/6731
941,282,887
6,731
[ "chakra-core", "ChakraCore" ]
Hi everyone. Here is small issue in opcodes comment-documentation https://github.com/chakra-core/ChakraCore/blob/master/lib/Runtime/ByteCode/OpCodes.h#L165 Comment shoul be the following - // Branch if object has the given property ... The same is for BrOnHasEnvProperty. Thank you.
Wrong documentation comment
https://api.github.com/repos/chakra-core/ChakraCore/issues/6730/comments
1
2021-07-06T09:19:25Z
2021-07-13T07:47:56Z
https://github.com/chakra-core/ChakraCore/issues/6730
937,691,595
6,730
[ "chakra-core", "ChakraCore" ]
How to run an external program in the code.js? For example, SQLite. Is it possible to do this regardless of the Windows or Linux operating system?
How to run an external program in the code.js?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6729/comments
2
2021-07-05T07:53:34Z
2021-07-06T10:08:12Z
https://github.com/chakra-core/ChakraCore/issues/6729
936,800,751
6,729
[ "chakra-core", "ChakraCore" ]
How to get the environment data in the code.js? For example, REMOTE_ADDR, QUERY_STRING, HTTP_COOKIE, and others. Is it possible to do this regardless of the Windows or Linux operating system?
How to get REMOTE_ADDR in code.js?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6728/comments
5
2021-07-05T07:37:31Z
2021-07-06T10:08:21Z
https://github.com/chakra-core/ChakraCore/issues/6728
936,788,928
6,728
[ "chakra-core", "ChakraCore" ]
Hi All, ChakraCore failed to run tests with 2 failures on windows with MSVC. This issue can be reproduced on latest version 385409e, could you please look at this issue? Repro steps: 1. git clone http://github.com/microsoft/ChakraCore F:\gitP\microsoft\ChakraCore 2. Open a vs2019 x64 command prompt. 3. cd F:\gitP\microsoft\ChakraCore 4. msbuild /m /p:Platform=x64 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.18362.0 Build\Chakra.Core.sln /t:Rebuild 5. cd F:\gitP\microsoft\ChakraCore\test 6. set NUM_RL_THREADS=10 7. set WindowsSDKVersion=10.0.18362.0 8. runtests -x64test Build log: [run_test.log](https://github.com/chakra-core/ChakraCore/files/6714543/run_test.log) Error info: 10>ERROR: Test failed to run correctly: diffs from baseline (F:\gitP\microsoft\ChakraCore\test\Error\errorCtor_v4.baseline): 10> ch.exe -WERExceptionSupport -ExtendedErrorStackForTestHost -BaselineMode -forceNative -off:simpleJit -bgJitDelay:0 -dynamicprofileinput:profile.dpl.UnnamedTest568 -ExtendedErrorStackForTestHost F:\gitP\microsoft\ChakraCore\test\Error\errorCtor.js >F:\gitP\microsoft\ChakraCore\test\Error\testout440 2>&1 10>ERROR: name of output file: F:\gitP\microsoft\ChakraCore\test\Error\testout440; size: 21662; creation: Thu Jun 24 23:56:45 2021, last access: Thu Jun 24 23:56:45 2021, now: Thu Jun 24 23:56:46 2021 10>ERROR: bad output file follows ============ 10>----------------------------------------- 10>Error() 10>message = (string) 10>name = Error (string) 10>number = undefined (undefined) 10>stack = Error 10> at eval code (eval code:1:1) 10> at Test(string, string) (errorCtor.js:68:5) 10> at TestCtor(string) (errorCtor.js:75:5) 10> at Global code (errorCtor.js:111:1)(string) 10>----------------------------------------- 10>Error(NaN, NaN) 10>message = NaN (string) 10>name = Error (string) 10>number = undefined (undefined) 10>stack = Error: NaN 10> at eval code (eval code:1:1) 10> at Test(string, string) (errorCtor.js:68:5) 10> at TestCtor(string) (errorCtor.js:78:5) 10> at Global code (errorCtor.js:111:1)(string) 10>----------------------------------------- ... Summary: F:\gitP\microsoft\ChakraCore\test had 2217 tests; 2 failures -- runtests.cmd >> Tests failed. See logs for details. -- runtests.cmd >> exiting with exit code 1
ChakraCore failed to run tests with 2 failures on windows with MSVC
https://api.github.com/repos/chakra-core/ChakraCore/issues/6722/comments
6
2021-06-25T08:01:14Z
2021-11-01T22:24:42Z
https://github.com/chakra-core/ChakraCore/issues/6722
929,936,617
6,722
[ "chakra-core", "ChakraCore" ]
Hi. You already have a .NET binding here: https://github.com/chakra-core/ChakraCore/wiki/Embedding-ChakraCore What about a Java binding?
Could you provide a Java binding?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6721/comments
0
2021-06-22T05:34:10Z
2021-06-25T12:13:46Z
https://github.com/chakra-core/ChakraCore/issues/6721
926,847,634
6,721
[ "chakra-core", "ChakraCore" ]
`JsIsCallable` returns true if a class expression is passed - Was it intended to return true?
[JSRT API] Issue about JsIsCallable
https://api.github.com/repos/chakra-core/ChakraCore/issues/6720/comments
3
2021-05-25T05:45:24Z
2021-07-02T22:08:08Z
https://github.com/chakra-core/ChakraCore/issues/6720
900,301,957
6,720
[ "chakra-core", "ChakraCore" ]
when encoding is gbk or gb2312 , the result is error.
file.readalltext has bugs
https://api.github.com/repos/chakra-core/ChakraCore/issues/6719/comments
1
2021-05-20T11:59:08Z
2021-07-01T09:42:22Z
https://github.com/chakra-core/ChakraCore/issues/6719
896,715,187
6,719
[ "chakra-core", "ChakraCore" ]
chakra version ``` Checked revision: 0fc6103461dac83f24e418b7013af5b4137607f5 Build command: ./build.sh --debug $ chakra --version ch version 1.12.0.0-beta ``` os ``` Ubuntu 20.04.2 LTS ``` Testcase, a common function, but it will lead the **debug version** to an assertion error. ```js function foo(...{ 0: a, 1: b = 1 }) { return a+b+1; } foo(foo(4), 1); ``` Error message ``` ASSERTION 1616645: (ChakraCore/lib/Runtime/./Language/InlineCache.h, line 471) *propertyValue == slowPathValue || (VarIs<RootObjectBase>(propertyObject) && *propertyValue == rootObjectValue) || (slowPathValue == requestContext->GetLibrary()->GetNull() && requestContext->GetThreadContext()->IsDisableImplicitCall() && propertyObject->GetType()->IsExternal()) Failure: (*propertyValue == slowPathValue || (VarIs<RootObjectBase>(propertyObject) && *propertyValue == rootObjectValue) || (slowPathValue == requestContext->GetLibrary()->GetNull() && requestContext->GetThreadContext()->IsDisableImplicitCall() && propertyObject->GetType()->IsExternal())) Illegal instruction (core dumped) ``` Backtrace ``` #0 0x00007ffff4a26612 in Js::InlineCache::OutputPropertyValue<false, true, (Js::CacheType)2, (Js::SlotType)1>::impl (cache=0x7ff7f2beaf10, instance=0x7ff7f1372300, propertyObject=0x7ff7f1372300, propertyId=0x2fd, propertyValue=0x7fffffff9c98, requestContext=0x555555fb3a08) at ChakraCore/lib/Runtime/./Language/InlineCache.h:468 #1 0x00007ffff4a2cba3 in Js::InlineCache::OutputPropertyValueAndOperationInfo<false, true, true, (Js::CacheType)2, (Js::SlotType)1> (this=0x7ff7f2beaf10, instance=0x7ff7f1372300, propertyObject=0x7ff7f1372300, propertyId=0x2fd, propertyValue=0x7fffffff9c98, requestContext=0x555555fb3a08, operationInfo=0x7fffffff9c78) at ChakraCore/lib/Runtime/./Language/InlineCache.h:388 #2 0x00007ffff4a2c44b in Js::InlineCache::TryGetProperty<true, true, true, true, true, false> (this=0x7ff7f2beaf10, instance=0x7ff7f1372300, propertyObject=0x7ff7f1372300, propertyId=0x2fd, propertyValue=0x7fffffff9c98, requestContext=0x555555fb3a08, operationInfo=0x7fffffff9c78) at ChakraCore/lib/Runtime/./Language/InlineCache.inl:80 #3 0x00007ffff4a4add3 in Js::CacheOperators::TryGetProperty<true, true, true, true, true, true, true, false, true, false> (instance=0x7ff7f1372300, isRoot=0x0, object=0x7ff7f1372300, propertyId=0x2fd, propertyValue=0x7fffffff9c98, requestContext=0x555555fb3a08, operationInfo=0x7fffffff9c78, propertyValueInfo=0x7fffffff9c38) at ChakraCore/lib/Runtime/./Language/CacheOperators.inl:42 #4 0x00007ffff4a4769b in Js::ProfilingHelpers::ProfiledLdFld<false, false, false> (instance=0x7ff7f1372300, propertyId=0x2fd, inlineCache=0x7ff7f2beaf10, inlineCacheIndex=0x1, functionBody=0x7ff7f13571f0, thisInstance=0x7ff7f1372300) at ChakraCore/lib/Runtime/Language/ProfilingHelpers.cpp:977 #5 0x00007ffff49a2a05 in Js::InterpreterStackFrame::ProfiledGetProperty<Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned, false, false, false>(Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned __unaligned*, void*) (this=0x7fffffffad50, playout=0x7ff7f2bf40d9, instance=0x7ff7f1372300) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4177 #6 0x00007ffff496d2d2 in Js::InterpreterStackFrame::OP_ProfiledGetProperty<Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned>(Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned __unaligned*) (this=0x7fffffffad50, playout=0x7ff7f2bf40d9) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4350 #7 0x00007ffff48568bb in Js::InterpreterStackFrame::ProcessProfiled (this=0x7fffffffad50) at ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:176 #8 0x00007ffff47f8372 in Js::InterpreterStackFrame::Process (this=0x7fffffffad50) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3472 #9 0x00007ffff47f7033 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ff7f2396730, args=..., returnAddress=0x7ff7f12e0f9a, addressOfReturnAddress=0x7fffffffb2a8, asmJsReturn=0x0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2153 #10 0x00007ffff47f6110 in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7fffffffb2c0) at ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1833 #11 0x00007ff7f12e0f9a in ?? () #12 0x00007fffffffb2f0 in ?? () #13 0x00007ffff4e8a43e in amd64_CallFunction () at ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 Backtrace stopped: frame did not save the PC ```
ASSERTION in ChakraCore/lib/Runtime/./Language/InlineCache.h, line 471
https://api.github.com/repos/chakra-core/ChakraCore/issues/6717/comments
2
2021-05-18T07:28:15Z
2022-03-11T15:05:41Z
https://github.com/chakra-core/ChakraCore/issues/6717
894,067,858
6,717
[ "chakra-core", "ChakraCore" ]
chakra version ``` Checked revision: 0fc6103461dac83f24e418b7013af5b4137607f5 Build command: ./build.sh --debug $ chakra --version ch version 1.12.0.0-beta ``` os ``` Ubuntu 20.04.2 LTS ``` testcase ``` var x = WScript.LoadScript('', 'samethread', 'foo.js'); const y = x('test', Function); ``` The error message: ``` ASSERTION 869987: (ChakraCore/lib/Jsrt/Jsrt.cpp, line 1543) *value == nullptr || !Js::CrossSite::NeedMarshalVar(*value, scriptContext) Failure: (*value == nullptr || !Js::CrossSite::NeedMarshalVar(*value, scriptContext)) Illegal instruction (core dumped) ``` Backtrace: ``` #0 0x00007ffff3d5a12f in JsGetPropertyCommon (scriptContext=0x555555fb3ab8, object=0x7ff7f1379840, propertyRecord=0x7ffff5a498f0 <Js::BuiltInPropertyRecords::exception>, value=0x7fffffffd490) at ChakraCore/lib/Jsrt/Jsrt.cpp:1543 #1 0x00007ffff3d59fad in JsGetProperty::$_37::operator() (this=0x7fffffffcbe0, scriptContext=0x555555fb3ab8, _actionEntryPopper=...) at ChakraCore/lib/Jsrt/Jsrt.cpp:1560 #2 0x00007ffff3d59dd4 in ContextAPIWrapper<false, JsGetProperty::$_37>(JsGetProperty::$_37)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (this=0x7fffffffcb78, scriptContext=0x555555fb3ab8) at ChakraCore/lib/Jsrt/JsrtInternal.h:237 #3 0x00007ffff3d59774 in ContextAPIWrapper_Core<false, ContextAPIWrapper<false, JsGetProperty::$_37>(JsGetProperty::$_37)::{lambda(Js::ScriptContext*)#1}>(ContextAPIWrapper<false, JsGetProperty::$_37>(JsGetProperty::$_37)::{lambda(Js::ScriptContext*)#1}) (fn=...) at ChakraCore/lib/Jsrt/JsrtInternal.h:192 #4 0x00007ffff3d3f066 in ContextAPIWrapper<false, JsGetProperty::$_37> (fn=...) at ChakraCore/lib/Jsrt/JsrtInternal.h:235 #5 0x00007ffff3d3f01e in JsGetProperty (object=0x7ff7f1379840, propertyId=0x7ffff5a498f0 <Js::BuiltInPropertyRecords::exception>, value=0x7fffffffd490) at ChakraCore/lib/Jsrt/Jsrt.cpp:1550 #6 0x0000555555565e70 in ChakraRTInterface::JsGetProperty (object=0x7ff7f1379840, property=0x7ffff5a498f0 <Js::BuiltInPropertyRecords::exception>, value=0x7fffffffd490) at ChakraCore/bin/ch/ChakraRtInterface.h:414 #7 0x000055555557093c in WScriptJsrt::PrintException (fileName=0x555555f80540 "02.js", jsErrorCode=JsErrorScriptException, exception=0x7ff7f137d040) at ChakraCore/bin/ch/WScriptJsrt.cpp:1799 #8 0x000055555555d880 in RunScript (fileName=0x555555f80540 "02.js", fileContents=0x555555f81660 "\nif (typeof load == 'undefined')\n load = function (js_path) {\n WScript.LoadScriptFile(js_path);\n };\n\nvar x = WScript.LoadScript('', 'samethread', 'foo.js');\n\nconst y = x('test', Function);\n\n", fileLength=0xcb, fileContentsFinalizeCallback=0x55555556abe0 <WScriptJsrt::FinalizeFree(void*)>, bufferValue=0x0, fullPath=0x7fffffffd7d0 "02.js", parserStateCache=0x0) at ChakraCore/bin/ch/ch.cpp:472 #9 0x000055555555f2f0 in ExecuteTest (fileName=0x555555f80540 "02.js") at ChakraCore/bin/ch/ch.cpp:917 #10 0x000055555555f3ac in ExecuteTestWithMemoryCheck (fileName=0x555555f80540 "02.js") at ChakraCore/bin/ch/ch.cpp:967 #11 0x000055555555fc77 in main (argc=0x2, c_argv=0x7fffffffdc18) at ChakraCore/bin/ch/ch.cpp:1274 #12 0x00007ffff75870b3 in __libc_start_main (main=0x55555555f410 <main(int, char**)>, argc=0x2, argv=0x7fffffffdc18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc08) at ../csu/libc-start.c:308 #13 0x000055555555ca7e in _start () ```
ASSERTION in ChakraCore/lib/Jsrt/Jsrt.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6716/comments
1
2021-05-18T03:07:24Z
2021-05-20T20:28:48Z
https://github.com/chakra-core/ChakraCore/issues/6716
893,901,521
6,716
[ "chakra-core", "ChakraCore" ]
When I try to download the latest release of ChakraCore: ![p](https://user-images.githubusercontent.com/29711228/116958605-c8ad3600-accd-11eb-9eec-0b4ef1a34460.png) I tried to change the network environment, but I still get a domain name resolution error. Please fix it, thanks. Download Link: `https://aka.ms/chakracore/cc_windows_all_1_11_24` TIME: 2021/05/04 UTC 3:45
Something wrong when downloading chakracore.
https://api.github.com/repos/chakra-core/ChakraCore/issues/6714/comments
3
2021-05-04T03:45:56Z
2021-05-05T03:38:38Z
https://github.com/chakra-core/ChakraCore/issues/6714
875,076,674
6,714
[ "chakra-core", "ChakraCore" ]
<img width="1440" alt="Screen Shot 2564-05-02 at 20 33 15" src="https://user-images.githubusercontent.com/25886138/116815018-d061c300-ab85-11eb-8dec-2e7014eb016c.png"> Hi, guys, I'm trying to achieve stickly navbar. However, I just found that the button component seem to overlap when I the stick properties ` <Flex as="nav" align="center" justify="space-between" wrap="wrap" w="100%" pt={6} pb={6} pr={24} pl={24} bg={"white"} boxShadow="md" position="sticky" top="0" >` Here is my setup for my navbar Can some body help me with this issue?
Overlap button with stickly navbar
https://api.github.com/repos/chakra-core/ChakraCore/issues/6713/comments
1
2021-05-02T13:36:33Z
2021-05-02T15:37:02Z
https://github.com/chakra-core/ChakraCore/issues/6713
873,944,598
6,713
[ "chakra-core", "ChakraCore" ]
After running small benchmark on Windows 10 with x64_debug config, i've got these results: ``` 13996ms (for-of), 90ms (for-non-cached), 63ms (for-cached) (on average after 10 subsequent runs) For-of is slower than for-non-cached by 15551% and For-of is slower than for-cached by 22215%! ``` Bench code: ```js { const a = Array.from({ length: 1e7 }, _ => 0); let start = (console.log('Start'), Date.now()); for (const _ of a); console.log(Date.now() - start + 'ms (for-of)'); start = Date.now(); for (let i = 0; i < a.length; i++) { const _ = a[i]; } console.log(Date.now() - start + 'ms (for-non-cached)'); start = Date.now(); const length = a.length; for (let i = 0; i < length; i++) { const _ = a[i]; } console.log(Date.now() - start + 'ms (for-cached)'); } ```
[Perfomance] For-of vs For non-cached vs For-cached
https://api.github.com/repos/chakra-core/ChakraCore/issues/6711/comments
15
2021-04-28T20:39:51Z
2021-05-20T20:31:19Z
https://github.com/chakra-core/ChakraCore/issues/6711
870,364,820
6,711
[ "chakra-core", "ChakraCore" ]
The following code crashes after about 250 iterations. ```javascript for(let i=0;i<10000;++i) { let a=[0.0]; } ``` The crash seems to only happen in a release build and the value in the array needs to be float. ### Environment Windows 10 x64 Visual Studio 2019 16.9.4 ChakraCore: master at 8917a7e ### Call stack ``` ChakraCore.dll!ReportFatalException(unsigned __int64 context, HRESULT exceptionCode, ErrorReason reasonCode, unsigned __int64) Line 26 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Common\Exceptions\ReportError.cpp(26) ChakraCore.dll!ShiftAddr(const ThreadContextInfo * const context, unsigned __int64 address) Line 563 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Runtime\Base\ThreadContextInfo.cpp(563) [Inline Frame] ChakraCore.dll!IR::GetMethodOriginalAddress(ThreadContextInfo * helperMethod, IR::JnHelperMethod) Line 296 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\JnHelperMethod.cpp(296) [Inline Frame] ChakraCore.dll!IR::GetMethodAddress(ThreadContextInfo * context, IR::HelperCallOpnd *) Line 126 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\JnHelperMethod.cpp(126) [Inline Frame] ChakraCore.dll!IR::Opnd::GetImmediateValue(Func * func) Line 464 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\Opnd.cpp(464) ChakraCore.dll!PeepsMD::PeepAssign(IR::Instr * instr) Line 67 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\amd64\PeepsMD.cpp(67) ChakraCore.dll!Peeps::PeepAssign(IR::Instr * assign) Line 379 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\Peeps.cpp(379) ChakraCore.dll!Peeps::PeepFunc() Line 149 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\Peeps.cpp(149) ChakraCore.dll!Func::TryCodegen() Line 516 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\Func.cpp(516) ChakraCore.dll!Func::Codegen(Memory::JitArenaAllocator * alloc, JITTimeWorkItem * workItem, ThreadContextInfo * threadContextInfo, ScriptContextInfo * scriptContextInfo, JITOutputIDL * outputData, Js::EntryPointInfo * epInfo, const FunctionJITRuntimeInfo * const polymorphicInlineCacheInfo, JITTimePolymorphicInlineCacheInfo * const codeGenAllocators, void * const isBackgroundJIT, Js::ScriptContextProfiler * const) Line 326 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\Func.cpp(326) ChakraCore.dll!NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper,Memory::SegmentBase<Memory::VirtualAllocWrapper>,Memory::PageSegmentBase<Memory::VirtualAllocWrapper>> * pageAllocator, CodeGenWorkItemIDL * workItemData, JITOutputIDL & jitWriteData, const bool foreground, Js::EntryPointInfo * epInfo) Line 897 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\NativeCodeGenerator.cpp(897) ChakraCore.dll!NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper,Memory::SegmentBase<Memory::VirtualAllocWrapper>,Memory::PageSegmentBase<Memory::VirtualAllocWrapper>> * pageAllocator, CodeGenWorkItem * workItem, const bool foreground) Line 1023 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\NativeCodeGenerator.cpp(1023) ChakraCore.dll!NativeCodeGenerator::Process(JsUtil::Job * const job, JsUtil::ParallelThreadData * threadData) Line 1908 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Backend\NativeCodeGenerator.cpp(1908) ChakraCore.dll!JsUtil::BackgroundJobProcessor::Process(JsUtil::Job * const job, JsUtil::ParallelThreadData * threadData) Line 1037 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Common\Common\Jobs.cpp(1037) ChakraCore.dll!JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData * threadData) Line 1135 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Common\Common\Jobs.cpp(1135) ChakraCore.dll!JsUtil::BackgroundJobProcessor::StaticThreadProc(void * lpParam) Line 1324 at L:\chakra\2021-04-18___8917a7e\ChakraCore-master\lib\Common\Common\Jobs.cpp(1324) ```
Crash (AssertOrFailFast) in ShiftAddr() function
https://api.github.com/repos/chakra-core/ChakraCore/issues/6707/comments
16
2021-04-19T08:40:30Z
2021-09-07T18:11:54Z
https://github.com/chakra-core/ChakraCore/issues/6707
861,057,647
6,707
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = [13.37,1337,1337,1337,1337]; async function v3(v4,v5,v6,v7,v8) { const v9 = ` v7; `; for (const v11 in v7) { for (const v13 in v5) { const v14 = {b:v9,e:v13,...v8,...v3,...1,...v7}; const v15 = await v14; } function v16(v17) { } const v18 = v16; function v19(v20,v21) { v16 = v20; } } const v22 = v3(RegExp,v4,RegExp,v2); } const v23 = v3(); } main(); ``` Bactrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000102e1475c libChakraCore.dylib`Js::InterpreterStackFrame::OP_LdSlot(this=0x00000001006f7c00, instance=0x0000000000000000, slotIndex=2) at InterpreterStackFrame.cpp:9169:28 9166 { 9167 if (!PHASE_OFF(ClosureRangeCheckPhase, this->m_functionBody)) 9168 { -> 9169 if ((uintptr_t)((Var*)instance)[ScopeSlots::EncodedSlotCountSlotIndex] <= (uintptr_t)(slotIndex - ScopeSlots::FirstSlotIndex)) 9170 { 9171 Js::Throw::FatalInternalError(); 9172 } Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x0000000102e1475c libChakraCore.dylib`Js::InterpreterStackFrame::OP_LdSlot(this=0x00000001006f7c00, instance=0x0000000000000000, slotIndex=2) at InterpreterStackFrame.cpp:9169:28 frame #1: 0x0000000102d35799 libChakraCore.dylib`void* Js::InterpreterStackFrame::OP_LdInnerSlot<Js::OpLayoutDynamicProfile<Js::OpLayoutT_ElementSlotI2<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00000001006f7c00, slotArray=0x0000000000000000, playout=0x000000090824d0af)0> > > __unaligned const __unaligned*) at InterpreterStackFrame.cpp:9196:16 frame #2: 0x0000000102d0674c libChakraCore.dylib`void* Js::InterpreterStackFrame::OP_ProfiledLdInnerSlot<Js::OpLayoutDynamicProfile<Js::OpLayoutT_ElementSlotI2<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00000001006f7c00, slotArray=0x0000000000000000, playout=0x000000090824d0af)0> > > __unaligned const __unaligned*) at InterpreterStackFrame.cpp:9203:21 frame #3: 0x0000000102cfef47 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00000001006f7c00) at InterpreterHandler.inl:253:3 frame #4: 0x0000000102c93804 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00000001006f7c00) at InterpreterStackFrame.cpp:3472:20 frame #5: 0x0000000102c9230c libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001006e6820, args=ArgumentReader @ 0x00007ffeefbfe1f0, returnAddress=0x0000000908260f92, addressOfReturnAddress=0x00007ffeefbfe238, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #6: 0x0000000102c91390 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfe250) at InterpreterStackFrame.cpp:1833:16 frame #7: 0x0000000908260f92 frame #8: 0x000000010340d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #9: 0x00000001030c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001006e6820, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe348, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #10: 0x00000001030d29c7 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x00000009082290c0, data=0x0000000908466820, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #11: 0x0000000103083814 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x00000009084674d0, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #12: 0x00000001030839f8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x00000009084674d0, generator=0x00000009082290c0, resolve=0x00000009082bf0c0, reject=0x00000009082bf120) at JavascriptAsyncFunction.cpp:151:25 frame #13: 0x0000000103084487 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x00000009084673f0, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #14: 0x00000001032873d6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x0000000908469230, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #15: 0x000000010340d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #16: 0x00000001030c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000908469230, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfeb00, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #17: 0x00000001030c657f libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x0000000908469230, args=Arguments @ 0x00007ffeefbfeb70, scriptContext=0x0000000101819658, inScript=true) at JavascriptFunction.cpp:772:24 frame #18: 0x00000001030c63bc libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x0000000908469230, args=<unavailable>, scriptContext=0x0000000101819658, inScript=true) at JavascriptFunction.cpp:717:15 frame #19: 0x00000001030c6361 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x0000000908469230, args=<unavailable>, scriptContext=0x0000000101819658, inScript=true) at JavascriptFunction.cpp:832:16 ``` How to reproduce it: ``` - build.sh -d -j - ./ch poc.js ```
Invalid Memory Access in `OP_LdSlot`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6705/comments
1
2021-04-17T02:58:47Z
2021-04-18T14:58:14Z
https://github.com/chakra-core/ChakraCore/issues/6705
860,307,759
6,705
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v0 = {}; async function v1(v2,v3,v4,v5,v6) { for (const v7 in v0) { let v8 = 0; const v9 = v8++; const v10 = await v9; } function v11(v12,v13) { } const v15 = new Promise(v11); const v18 = Object(); const v19 = class V19 { constructor(v21,v22) { const v23 = v18 in BigInt; } p(v25) { } }; const v26 = v1(); } const v27 = v1(); CollectGarbage(); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x0000000103006dee libChakraCore.dylib`Js::JavascriptLibrary::GetScriptContext(this=0xc08148008b480000) const at JavascriptLibrary.h:594:58 591 void Initialize(ScriptContext* scriptContext, GlobalObject * globalObject); 592 void Uninitialize(); 593 GlobalObject* GetGlobalObject() const { return globalObject; } -> 594 ScriptContext* GetScriptContext() const { return scriptContext; } 595 596 Recycler * GetRecycler() const { return recycler; } 597 Var GetTrueOrFalse(BOOL value) { return value ? booleanTrue : booleanFalse; } Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) * frame #0: 0x0000000103006dee libChakraCore.dylib`Js::JavascriptLibrary::GetScriptContext(this=0xc08148008b480000) const at JavascriptLibrary.h:594:58 frame #1: 0x0000000103006d6d libChakraCore.dylib`Js::RecyclableObject::GetScriptContext(this=0x00007ffeefa83ed0) const at RecyclableObject.inl:23:36 frame #2: 0x00000001031b7e29 libChakraCore.dylib`CheckIsExecutable(function=0x00007ffeefa83ed0, entrypoint=(0x401f0f00000b768e))(Js::RecyclableObject*, Js::CallInfo, ...)) at BackendApi.cpp:143:51 frame #3: 0x0000000104280d68 libChakraCore.dylib`Js::JavascriptPromise::NewInstance(function=0x00000001024101c0, callInfo=(Count = 2, Flags = CallFlags_New, unused = 0)) at JavascriptPromise.cpp:76:17 frame #4: 0x000000010254266e frame #5: 0x000000010440d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #6: 0x00000001040c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001022e67d0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefa84008, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #7: 0x00000001040d29c7 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x00000001027092a0, data=0x00000001022e5030, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #8: 0x0000000104083814 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x00000001025b6e00, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #9: 0x00000001040839f8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x00000001025b6e00, generator=0x00000001027092a0, resolve=0x0000000102707d20, reject=0x0000000102707d80) at JavascriptAsyncFunction.cpp:151:25 frame #10: 0x00000001040836c6 libChakraCore.dylib`Js::JavascriptAsyncFunction::BeginAsyncFunctionExecution(generator=0x00000001027092a0) at JavascriptAsyncFunction.cpp:73:9 frame #11: 0x00000001040834b3 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncFunctionImplementation(function=0x0000000102447b00, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:52:12 frame #12: 0x000000010440d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #13: 0x00000001040c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000102447b00, entryPoint=(libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncFunctionImplementation(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptAsyncFunction.cpp:42), args=Arguments @ 0x00007ffeefa84558, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #14: 0x0000000103e29d8a libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x000000010270d000, playout=0x000000010246d0b5, function=0x0000000102447b00, flags=2, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3988:54 frame #15: 0x0000000103e29681 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x000000010270d000, playout=0x000000010246d0b5, function=0x0000000102447b00, flags=0, profileId=2, inlineCacheIndex=4294967295, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #16: 0x0000000103d04a13 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallI<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x000000010270d000, playout=0x000000010246d0b5)0> > > const __unaligned*) at InterpreterStackFrame.h:515:104 frame #17: 0x0000000103cf956e libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x000000010270d000) at InterpreterHandler.inl:87:3 frame #18: 0x0000000103c93804 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x000000010270d000) at InterpreterStackFrame.cpp:3472:20 frame #19: 0x0000000103c9230c libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001022e67d0, args=ArgumentReader @ 0x00007ffeefa85ab0, returnAddress=0x0000000102480f92, addressOfReturnAddress=0x00007ffeefa85af8, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 ``` How to reproduce it: ``` - ./build.sh -d -j - ./ch poc.js ```
Invalid Memory Access in `GetScriptContext`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6704/comments
1
2021-04-17T02:50:13Z
2021-04-17T11:21:44Z
https://github.com/chakra-core/ChakraCore/issues/6704
860,306,492
6,704
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { try { } catch(v1) { if (isConcatSpreadable) { } else { } } const v2 = ` let v3 = 0; while (v3 < 10) { const v8 = [1337,1337,1337,1337]; const v9 = v8.reduceRight(CollectGarbage); const v10 = v3++; } function v11(v12) { } const v13 = v11; const v16 = [13.37]; function v17(v18,v19) { const v22 = v17(v16,"EPSILON",1337,13.37); } const v23 = v17(); v13; `; let v24 = eval; const v25 = v24(v2); const v26 = class V26 { constructor(v28,v29,v30) { v24 = v26; } fround(v32,v33,v34) { } }; CollectGarbage(); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000102a90395 libChakraCore.dylib`FuncInfo::FindOrAddRootObjectInlineCacheId(this=0x00000009083503f0, propertyId=-1, isLoadMethod=true, isStore=false) at FuncInfo.cpp:217:5 214 215 uint FuncInfo::FindOrAddRootObjectInlineCacheId(Js::PropertyId propertyId, bool isLoadMethod, bool isStore) 216 { -> 217 Assert(propertyId != Js::Constants::NoProperty); 218 Assert(!isLoadMethod || !isStore); 219 uint cacheId; 220 RootObjectInlineCacheIdMap * idMap = isStore ? rootObjectStoreInlineCacheMap : isLoadMethod ? rootObjectLoadMethodInlineCacheMap : rootObjectLoadInlineCacheMap; Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102a90395 libChakraCore.dylib`FuncInfo::FindOrAddRootObjectInlineCacheId(this=0x00000009083503f0, propertyId=-1, isLoadMethod=true, isStore=false) at FuncInfo.cpp:217:5 frame #1: 0x0000000102986b4a libChakraCore.dylib`EmitMethodFld(isRoot=true, isScoped=false, location=4, callObjLocation=4294967293, propertyId=-1, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, registerCacheIdForCall=true) at ByteCodeEmitter.cpp:7895:34 frame #2: 0x0000000102986c9e libChakraCore.dylib`EmitMethodFld(pnode=0x000000090834eb20, callObjLocation=4294967293, propertyId=-1, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, registerCacheIdForCall=true) at ByteCodeEmitter.cpp:7908:5 frame #3: 0x0000000102987892 libChakraCore.dylib`EmitCallTarget(pnodeTarget=0x000000090834eb20, fSideEffectArgs=NO, thisLocation=0x00007ffeefbf6f50, releaseThisLocation=0x00007ffeefbf6f21, callObjLocation=0x00007ffeefbf6f4c, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, callApplyCallSiteId=0x00007ffeefbf6f1e) at ByteCodeEmitter.cpp:8170:17 frame #4: 0x00000001029720ed libChakraCore.dylib`EmitCall(pnodeCall=0x000000090834ec60, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, fReturnValue=NO, fEvaluateComponents=YES, overrideThisLocation=4294967295, newTargetLocation=4294967295) at ByteCodeEmitter.cpp:8575:13 frame #5: 0x000000010296672c libChakraCore.dylib`Emit(pnode=0x000000090834ec60, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, fReturnValue=NO, isConstructorCall=false, isTopLevel=false) at ByteCodeEmitter.cpp:11573:17 frame #6: 0x0000000102967c70 libChakraCore.dylib`Emit(pnode=0x000000090834ea50, byteCodeGenerator=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0, fReturnValue=NO, isConstructorCall=false, isTopLevel=true) at ByteCodeEmitter.cpp:11913:17 frame #7: 0x0000000102964adf libChakraCore.dylib`ByteCodeGenerator::EmitTopLevelStatement(this=0x00007ffeefbf8a10, stmt=0x000000090834ea50, funcInfo=0x00000009083503f0, fReturnValue=NO) at ByteCodeEmitter.cpp:984:5 frame #8: 0x000000010297467c libChakraCore.dylib`ByteCodeGenerator::EmitFunctionBody(this=0x00007ffeefbf8a10, funcInfo=0x00000009083503f0) at ByteCodeEmitter.cpp:2557:9 frame #9: 0x00000001029771c3 libChakraCore.dylib`ByteCodeGenerator::EmitOneFunction(this=0x00007ffeefbf8a10, pnodeFnc=0x000000090834e450) at ByteCodeEmitter.cpp:3123:13 frame #10: 0x0000000102974cd0 libChakraCore.dylib`ByteCodeGenerator::EmitScopeList(this=0x00007ffeefbf8a10, pnode=0x000000090834e450, breakOnBodyScopeNode=0x0000000000000000) at ByteCodeEmitter.cpp:3436:23 frame #11: 0x0000000102974de5 libChakraCore.dylib`ByteCodeGenerator::EmitScopeList(this=0x00007ffeefbf8a10, pnode=0x000000090834e170, breakOnBodyScopeNode=0x0000000000000000) at ByteCodeEmitter.cpp:3449:19 frame #12: 0x0000000102974a86 libChakraCore.dylib`ByteCodeGenerator::EmitProgram(this=0x00007ffeefbf8a10, pnodeProg=0x000000090834e030) at ByteCodeEmitter.cpp:2587:15 frame #13: 0x00000001029af34b libChakraCore.dylib`ByteCodeGenerator::Generate(pnodeProg=0x000000090834e030, grfscr=8390706, byteCodeGenerator=0x00007ffeefbf8a10, ppRootFunc=0x00007ffeefbf8f10, sourceIndex=1, forceNoNative=false, parser=0x00007ffeefbf9080, functionRef=0x00007ffeefbf9c10) at ByteCodeGenerator.cpp:2045:24 frame #14: 0x00000001029b414a libChakraCore.dylib`GenerateByteCode(pnode=0x000000090834e030, grfscr=8390706, scriptContext=0x000000010180f458, ppRootFunc=0x00007ffeefbf8f10, sourceIndex=1, forceNoNative=false, parser=0x00007ffeefbf9080, pse=0x00007ffeefbf8f38, parentScopeInfo=0x00000009076e1bd0, functionRef=0x00007ffeefbf9c10) at ByteCodeGenerator.cpp:2220:9 frame #15: 0x00000001027f95a0 libChakraCore.dylib`Js::ParseableFunctionInfo::Parse(this=0x000000090832bd80, functionRef=0x00007ffeefbf9c10, isByteCodeDeserialization=false) at FunctionBody.cpp:2529:46 frame #16: 0x00000001030c86b8 libChakraCore.dylib`Js::JavascriptFunction::DeferredParseCore(functionRef=0x00007ffeefbf9c10, fParsed=254) at JavascriptFunction.cpp:1667:38 frame #17: 0x00000001030c85f9 libChakraCore.dylib`Js::JavascriptFunction::DeferredParse(functionRef=0x00007ffeefbf9c10) at JavascriptFunction.cpp:1653:16 frame #18: 0x000000010340d1d0 libChakraCore.dylib`Js::JavascriptFunction::DeferredParsingThunk(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptFunctionA.S:197 frame #19: 0x000000010340d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 ``` How to reproduce it: ``` - ./build.sh -d -j - ./ch -collectGarbage poc.js ```
Assertion Failure in `FuncInfo::FindOrAddRootObjectInlineCacheId`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6703/comments
1
2021-04-17T02:33:43Z
2021-04-17T10:39:11Z
https://github.com/chakra-core/ChakraCore/issues/6703
860,304,096
6,703
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = async (v3,v4,...v5) => { }; const v9 = {call:v2,has:eval}; async function v10(v11,v12,v13,v14) { for (let v17 = 0; v17 < 257; v17++) { const v22 = [13.37,13.37,13.37,4294967296,13.37]; const v23 = [13.37]; const v24 = ["s2cshfCfBy"]; const v25 = {__proto__:v24,a:"-4294967297",d:v24,e:v22,length:4294967296,toString:arguments,valueOf:v23}; const v26 = await v9; } const v30 = [257,0,10,9007199254740992]; } const v31 = v10(); } main(); ``` Backtrace: ``` (gdb) bt #0 0x00007fd77b8014ef in ?? () #1 0x00000ffaef74fc61 in ?? () #2 0x00007fd77ba865d0 in ?? () #3 0x00000ffaef75cd0f in ?? () #4 0x00007fd77bae6870 in ?? () #5 0x00007fd77b801000 in ?? () #6 0x00007fd77b837000 in ?? () #7 0x00007fffb6663260 in ?? () #8 0x000055d8df6fd899 in Memory::Recycler::WBSetBit (addr=0x7fd77ba8a000 "") at /src/chakracore/lib/Common/Memory/Recycler.cpp:9227 #9 0x000055d8e19176ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #10 0x000055d8e0e74f98 in Js::JavascriptGenerator::CallGenerator (this=<optimized out>, data=<optimized out>, resumeKind=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptGenerator.cpp:185 #11 0x000055d8e0de62d9 in Js::JavascriptAsyncFunction::AsyncSpawnStep (stepFunction=0x7fd778b3b690, generator=0x7fd77ba83060, resolve=0x7fd77baa3300, reject=0x7fd77baa3360) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:151 #12 0x000055d8e0de8a68 in Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:130 #13 0x000055d8e15bf2f6 in Js::JavascriptPromise::EntryReactionTaskFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptPromise.cpp:1074 #14 0x000055d8e19176ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #15 0x000055d8e0e51f37 in Js::JavascriptFunction::CallRootFunctionInternal (obj=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:772 #16 0x000055d8e0e516ed in Js::JavascriptFunction::CallRootFunction (obj=<optimized out>, scriptContext=<optimized out>, inScript=true, args=...) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:717 #17 Js::JavascriptFunction::CallRootFunction (this=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:832 #18 0x000055d8df20d7c8 in JsCallFunction::$_67::operator() (_actionEntryPopper=..., this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2842 #19 _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/JsrtInternal.h:237 #20 ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}) (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:192 #21 ContextAPIWrapper<false, JsCallFunction::$_67> (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:235 #22 JsCallFunction (function=0x7fd778b38870, args=0x7fffb6663da0, cargs=1, result=0x7fffb6663dc0) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2804 #23 0x000055d8df014282 in ChakraRTInterface::JsCallFunction (function=0x7fd778b38870, arguments=<optimized out>, argumentCount=1, result=0x7fffb6663dc0) at /src/chakracore/bin/ch/ChakraRtInterface.h:416 #24 WScriptJsrt::CallbackMessage::CallFunction (this=0x7fffb6663dc0, fileName=<optimized out>) at /src/chakracore/bin/ch/WScriptJsrt.cpp:1993 #25 0x000055d8defe692e in MessageQueue::ProcessAll (this=<optimized out>, fileName=<optimized out>) at /src/chakracore/bin/ch/MessageQueue.h:256 #26 RunScript (fileName=0x6040000006d0 "WBSetBit.js", fileContents=0x616000000380 "function main() {\nconst v2 = async (v3,v4,...v5) => {\n};\nconst v9 = {call:v2,has:eval};\nasync function v10(v11,v12,v13,v14) {\n for (let v17 = 0; v17 < 257; v17++) {\n const v22 = [13.37,13.37"..., fileLength=140736253542352, fileContentsFinalizeCallback=0x55d8defffed0 <WScriptJsrt::FinalizeFree(void*)>, bufferValue=0x0, fullPath=<optimized out>, parserStateCache=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:605 #27 0x000055d8defeab65 in ExecuteTest (fileName=0x6040000006d0 "WBSetBit.js") at /src/chakracore/bin/ch/ch.cpp:1152 #28 0x000055d8defec029 in ExecuteTestWithMemoryCheck (fileName=0x55d8e4e58660 "") at /src/chakracore/bin/ch/ch.cpp:1203 #29 main (argc=<optimized out>, c_argv=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:1538 ``` How to reproduce it: ```bash - ./build.sh -d -j - ch poc.js ```
Invalid Memory Access in `WBSetBit`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6699/comments
0
2021-04-12T15:09:57Z
2021-04-18T14:58:14Z
https://github.com/chakra-core/ChakraCore/issues/6699
856,076,200
6,699
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v0 = "symbol"; const v4 = {constructor:Uint32Array,e:1337,length:13.37}; const v6 = [9007199254740991,9007199254740991,9007199254740991]; const v7 = Uint8ClampedArray; async function v8(v9,v10,v11,v12) { for (let v16 = 0; v16 < 1337; v16++) { const v17 = [v16]; const v18 = await v10; const v19 = v10 instanceof Uint32Array; const v21 = {set:v18}; const v23 = Object.defineProperty(v4,3,v21); } } const v24 = v8(); } main(); ``` Backtrace: ``` (gdb) bt #0 0x000055ca55a3ed04 in vtable for Js::ConcatString () #1 0x00007ffdd1058600 in ?? () #2 0x000055ca51e65176 in Js::JavascriptOperators::GetProperty_InternalSimple (instance=0x7f69cc4f9320, object=0x7f69cc4f9320, propertyId=400, value=0x7ffdd1058600, requestContext=0x622000000158) at /src/chakracore/lib/Runtime/Language/JavascriptOperators.cpp:1843 #3 0x000055ca51ed05ef in Js::JavascriptOperators::GetPropertyNoCache (instance=<optimized out>, propertyObject=0x7f69cc4f9320, propertyId=400, value=0x7ffdd1058600, requestContext=<optimized out>) at /src/chakracore/lib/Runtime/Language/JavascriptOperators.cpp:11325 #4 Js::JavascriptOperators::GetPropertyNoCache (instance=0x7f69cc4f9320, propertyId=400, value=0x7ffdd1058600, requestContext=<optimized out>) at /src/chakracore/lib/Runtime/Language/JavascriptOperators.cpp:11320 #5 Js::JavascriptOperators::ToPropertyDescriptorForGenericObjects (propertySpec=0x7f69cc4f9320, descriptor=0x7ffdd10587c0, scriptContext=<optimized out>) at /src/chakracore/lib/Runtime/Language/JavascriptOperators.cpp:9703 #6 0x000055ca51ed220c in Js::JavascriptOperators::ToPropertyDescriptor (propertySpec=0x7f69cc4f9320, descriptor=0x7ffdd10587c0, scriptContext=<optimized out>) at /src/chakracore/lib/Runtime/Language/JavascriptOperators.cpp:9757 #7 0x000055ca52aacc1d in Js::JavascriptObject::EntryDefineProperty (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptObject.cpp:1307 #8 0x00007f69cc5b1523 in ?? () #9 0x00007f69cf419940 in ?? () #10 0x0000000002000004 in ?? () #11 0x00007f69cf426f00 in ?? () #12 0x00007f69cf471e70 in ?? () #13 0x0001000000000003 in ?? () #14 0x00007f69cc4f9320 in ?? () #15 0x00007ffdd1058960 in ?? () #16 0x000055ca52cde8b1 in Js::ScriptFunction::UpdateThunkEntryPoint (this=0x7f69cf475030, entryPointInfo=<optimized out>, entryPoint=0x10000000000ef) at /src/chakracore/lib/Runtime/Library/ScriptFunction.cpp:309 #17 0x000055ca52e496ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #18 0x000055ca523a6f98 in Js::JavascriptGenerator::CallGenerator (this=<optimized out>, data=<optimized out>, resumeKind=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptGenerator.cpp:185 #19 0x000055ca523182d9 in Js::JavascriptAsyncFunction::AsyncSpawnStep (stepFunction=0x7f69cc4f3ee0, generator=0x7f69cf413060, resolve=0x7f69cf433300, reject=0x7f69cf433360) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:151 #20 0x000055ca5231aa68 in Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:130 #21 0x000055ca52af12f6 in Js::JavascriptPromise::EntryReactionTaskFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptPromise.cpp:1074 #22 0x000055ca52e496ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #23 0x000055ca52383f37 in Js::JavascriptFunction::CallRootFunctionInternal (obj=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:772 #24 0x000055ca523836ed in Js::JavascriptFunction::CallRootFunction (obj=<optimized out>, scriptContext=<optimized out>, inScript=true, args=...) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:717 #25 Js::JavascriptFunction::CallRootFunction (this=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:832 #26 0x000055ca5073f7c8 in JsCallFunction::$_67::operator() (_actionEntryPopper=..., this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2842 #27 _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/JsrtInternal.h:237 #28 ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}) (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:192 #29 ContextAPIWrapper<false, JsCallFunction::$_67> (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:235 #30 JsCallFunction (function=0x7f69cc4fa0a0, args=0x7ffdd1059420, cargs=1, result=0x7ffdd1059440) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2804 #31 0x000055ca50546282 in ChakraRTInterface::JsCallFunction (function=0x7f69cc4fa0a0, arguments=<optimized out>, argumentCount=1, result=0x7ffdd1059440) at /src/chakracore/bin/ch/ChakraRtInterface.h:416 #32 WScriptJsrt::CallbackMessage::CallFunction (this=0x7ffdd1059440, fileName=<optimized out>) at /src/chakracore/bin/ch/WScriptJsrt.cpp:1993 #33 0x000055ca5051892e in MessageQueue::ProcessAll (this=<optimized out>, fileName=<optimized out>) at /src/chakracore/bin/ch/MessageQueue.h:256 #34 RunScript (fileName=0x604000000710 "ConcatString.js", fileContents=0x615000000d00 "function main() {\nconst v0 = \"symbol\";\nconst v4 = {constructor:Uint32Array,e:1337,length:13.37};\nconst v6 = [9007199254740991,9007199254740991,9007199254740991];\nconst v7 = Uint8ClampedArray;\nasync fu"..., fileLength=140728110257744, fileContentsFinalizeCallback=0x55ca50531ed0 <WScriptJsrt::FinalizeFree(void*)>, bufferValue=0x0, fullPath=<optimized out>, parserStateCache=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:605 #35 0x000055ca5051cb65 in ExecuteTest (fileName=0x604000000710 "ConcatString.js") at /src/chakracore/bin/ch/ch.cpp:1152 #36 0x000055ca5051e029 in ExecuteTestWithMemoryCheck (fileName=0x7f69cc4f9320 "\320\036G\317i\177") at /src/chakracore/bin/ch/ch.cpp:1203 #37 main (argc=<optimized out>, c_argv=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:1538 ``` How to reproduce it: ```bash - ./build.sh -d -j - ch poc.js ```
Invalid Memory Access in `ConcatString`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6698/comments
0
2021-04-12T15:09:09Z
2021-04-18T14:58:14Z
https://github.com/chakra-core/ChakraCore/issues/6698
856,075,552
6,698
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = async (v3,v4,v5) => { for (const v7 in "pS1LFZI9uc") { for (const v8 in v5) { const v11 = String(); const v12 = eval(v11); const v13 = await "IJ8FcfXm6Z"; } } }; const v15 = v2(Symbol,Symbol,"NEGATIVE_INFINITY"); } main(); ``` Backtrace: ``` (gdb) bt #0 0x00007f6efdb918fc in ?? () #1 0x00007ffd7a3a56f0 in ?? () #2 0x000056205352a46a in Js::ParseableFunctionInfo::IsFunctionParsed (this=0x1000000000000) at /src/chakracore/lib/Runtime/./Base/FunctionBody.h:1733 #3 Js::FunctionProxy::IsFunctionBody (this=<optimized out>) at /src/chakracore/lib/Runtime/Base/FunctionBody.cpp:168 #4 0x00005620556376ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #5 0x0000562054b94f98 in Js::JavascriptGenerator::CallGenerator (this=<optimized out>, data=<optimized out>, resumeKind=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptGenerator.cpp:185 #6 0x0000562054b062d9 in Js::JavascriptAsyncFunction::AsyncSpawnStep (stepFunction=0x7f6efdad3930, generator=0x7f6f008d3060, resolve=0x7f6f008f36c0, reject=0x7f6f008f3720) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:151 #7 0x0000562054b08a68 in Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptAsyncFunction.cpp:130 #8 0x00005620552df2f6 in Js::JavascriptPromise::EntryReactionTaskFunction (function=<optimized out>, callInfo=...) at /src/chakracore/lib/Runtime/Library/JavascriptPromise.cpp:1074 #9 0x00005620556376ae in amd64_CallFunction () at /src/chakracore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #10 0x0000562054b71f37 in Js::JavascriptFunction::CallRootFunctionInternal (obj=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:772 #11 0x0000562054b716ed in Js::JavascriptFunction::CallRootFunction (obj=<optimized out>, scriptContext=<optimized out>, inScript=true, args=...) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:717 #12 Js::JavascriptFunction::CallRootFunction (this=<optimized out>, args=..., scriptContext=<optimized out>, inScript=<optimized out>) at /src/chakracore/lib/Runtime/Library/JavascriptFunction.cpp:832 #13 0x0000562052f2d7c8 in JsCallFunction::$_67::operator() (_actionEntryPopper=..., this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2842 #14 _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const (this=<optimized out>, scriptContext=<optimized out>) at /src/chakracore/lib/Jsrt/JsrtInternal.h:237 #15 ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::{lambda(Js::ScriptContext*)#1}) (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:192 #16 ContextAPIWrapper<false, JsCallFunction::$_67> (fn=...) at /src/chakracore/lib/Jsrt/JsrtInternal.h:235 #17 JsCallFunction (function=0x7f6efdad5640, args=0x7ffd7a3a6260, cargs=1, result=0x7ffd7a3a6280) at /src/chakracore/lib/Jsrt/Jsrt.cpp:2804 #18 0x0000562052d34282 in ChakraRTInterface::JsCallFunction (function=0x7f6efdad5640, arguments=<optimized out>, argumentCount=1, result=0x7ffd7a3a6280) at /src/chakracore/bin/ch/ChakraRtInterface.h:416 #19 WScriptJsrt::CallbackMessage::CallFunction (this=0x7ffd7a3a6280, fileName=<optimized out>) at /src/chakracore/bin/ch/WScriptJsrt.cpp:1993 #20 0x0000562052d0692e in MessageQueue::ProcessAll (this=<optimized out>, fileName=<optimized out>) at /src/chakracore/bin/ch/MessageQueue.h:256 #21 RunScript (fileName=0x606000000200 "IsFunctionParsed.js", fileContents=0x613000000200 "function main() {\nconst v2 = async (v3,v4,v5) => {\n for (const v7 in \"pS1LFZI9uc\") {\n for (const v8 in v5) {\n", ' ' <repeats 12 times>, "const v11 = String();\n", ' ' <repeats 12 times>, "const v12 = eval(v11);\n", ' ' <repeats 12 times>..., fileLength=140726654100624, fileContentsFinalizeCallback=0x562052d1fed0 <WScriptJsrt::FinalizeFree(void*)>, bufferValue=0x0, fullPath=<optimized out>, parserStateCache=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:605 #22 0x0000562052d0ab65 in ExecuteTest (fileName=0x606000000200 "IsFunctionParsed.js") at /src/chakracore/bin/ch/ch.cpp:1152 #23 0x0000562052d0c029 in ExecuteTestWithMemoryCheck (fileName=0x562058a47b30 "") at /src/chakracore/bin/ch/ch.cpp:1203 #24 main (argc=<optimized out>, c_argv=<optimized out>) at /src/chakracore/bin/ch/ch.cpp:1538 ``` How to reproduce: ```bash - ./build.sh -j -d - ch poc.js ```
Invalid Memory Access in `IsFunctionParsed`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6697/comments
0
2021-04-12T15:06:25Z
2021-04-18T14:58:13Z
https://github.com/chakra-core/ChakraCore/issues/6697
856,072,885
6,697
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = {constructor:"ffsJvcB1uX"}; for (let v5 = 1; v5 < 6; v5 = v5 + -2) { const v8 = Function(); v8.__proto__ = v2; v8[4294967297] = parseFloat; const v9 = {}; v8.length = v9; } } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000104eb7ce0 libChakraCore.dylib`bool Js::InlineCache::TrySetProperty<true, true, true, true>(this=0x000000010318aef0, object=0x00000001031e69b0, propertyId=206, propertyValue=0x0000000103544740, requestContext=0x0000000100811658, operationInfo=0x00007ffeefbfb8d0, propertyOperationFlags=PropertyOperation_None) at InlineCache.inl:240:13 237 operationInfo->cacheType = CacheType_Local; 238 operationInfo->slotType = SlotType_Aux; 239 } -> 240 Assert(canSetField); 241 return true; 242 } 243 Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000104eb7ce0 libChakraCore.dylib`bool Js::InlineCache::TrySetProperty<true, true, true, true>(this=0x000000010318aef0, object=0x00000001031e69b0, propertyId=206, propertyValue=0x0000000103544740, requestContext=0x0000000100811658, operationInfo=0x00007ffeefbfb8d0, propertyOperationFlags=PropertyOperation_None) at InlineCache.inl:240:13 frame #1: 0x0000000104ede3f5 libChakraCore.dylib`bool Js::CacheOperators::TrySetProperty<true, true, true, true, true, true, false, true>(object=0x00000001031e69b0, isRoot=false, propertyId=206, propertyValue=0x0000000103544740, requestContext=0x0000000100811658, propertyOperationFlags=PropertyOperation_None, operationInfo=0x00007ffeefbfb8d0, propertyValueInfo=0x00007ffeefbfb890) at CacheOperators.inl:157:34 frame #2: 0x0000000104edcee8 libChakraCore.dylib`void Js::ProfilingHelpers::ProfiledStFld<false>(instance=0x00000001031e69b0, propertyId=206, inlineCache=0x000000010318aef0, inlineCacheIndex=2, value=0x0000000103544740, flags=PropertyOperation_None, scriptFunction=0x00000001031e6780, thisInstance=0x00000001031e69b0) at ProfilingHelpers.cpp:1249:17 frame #3: 0x0000000104e2efcb libChakraCore.dylib`void Js::InterpreterStackFrame::ProfiledSetProperty<Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned, false>(this=0x00007ffeefbfc9d0, playout=0x000000010356805a, instance=0x00000001031e69b0, flags=PropertyOperation_None)0> > const __unaligned __unaligned*, void*, Js::PropertyOperationFlags) at InterpreterStackFrame.cpp:4697:9 frame #4: 0x0000000104d05df4 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledSetProperty<Js::OpLayoutT_ElementCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned>(this=0x00007ffeefbfc9d0, playout=0x000000010356805a)0> > const __unaligned __unaligned*) at InterpreterStackFrame.cpp:4752:9 frame #5: 0x0000000104cfdd4c libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfc9d0) at InterpreterHandler.inl:202:3 frame #6: 0x0000000104c93804 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfc9d0) at InterpreterStackFrame.cpp:3472:20 frame #7: 0x0000000104c9230c libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001031e6780, args=ArgumentReader @ 0x00007ffeefbfcf30, returnAddress=0x0000000103580f9a, addressOfReturnAddress=0x00007ffeefbfcf78, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #8: 0x0000000104c91390 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfcf90) at InterpreterStackFrame.cpp:1833:16 frame #9: 0x0000000103580f9a frame #10: 0x000000010540d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #11: 0x00000001050c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001031e6780, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfd0c0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #12: 0x0000000104e2bd8f libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe290, playout=0x000000010318cdd0, function=0x00000001031e6780, flags=16, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3973:21 frame #13: 0x0000000104e2b881 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe290, playout=0x000000010318cdd0, function=0x00000001031e6780, flags=0, profileId=0, inlineCacheIndex=0, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #14: 0x0000000104d04ce8 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfe290, playout=0x000000010318cdd0)0> > > const __unaligned*) at InterpreterStackFrame.h:520:115 frame #15: 0x0000000104cf9806 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfe290) at InterpreterHandler.inl:91:3 frame #16: 0x0000000104c93804 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfe290) at InterpreterStackFrame.cpp:3472:20 frame #17: 0x0000000104c9230c libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001031e6730, args=ArgumentReader @ 0x00007ffeefbfe780, returnAddress=0x0000000103580fa2, addressOfReturnAddress=0x00007ffeefbfe7c8, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #18: 0x0000000104c91390 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfe7e0) at InterpreterStackFrame.cpp:1833:16 frame #19: 0x0000000103580fa2 ``` How to reproduce: ``` - ./build.sh -d -j - ch poc.js ```
Assertion Error in `TrySetProperty`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6696/comments
0
2021-04-11T13:41:44Z
2021-04-15T07:20:22Z
https://github.com/chakra-core/ChakraCore/issues/6696
855,310,201
6,696
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v3 = async (v4,v5,v6,v7) => { }; const v10 = [13.37]; const v11 = {__proto__:v10,e:"e",valueOf:v3}; for (let v14 = v11; v14 < 1337; v14 = v14 ^ 2) { const v15 = v14++; } async function v16(v17,v18,v19,v20,v21) { for (let v24 = 0; v24 < 1337; v24++) { const v25 = await v24; } for (let v29 = 0; v29 < 1337; v29 = v29 + 128) { (1337)[v29] = 929444965; } } const v30 = v16(); for (const v34 in "undefined") { for (let v35 = 1; v35 < v34; v35 = v35 + v34) { const v36 = v35++; } } for (const v39 in "undefined") { for (let v40 = 1; v40 < v39; v40 = v40 + "O6WVmPSpHT") { const v41 = v40++; } } } main(); ``` Backtrace: ``` Failure: (aValue != nullptr) Process 24504 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00000001030dcdef libChakraCore.dylib`bool Js::VarIs<Js::RecyclableObject>(aValue=0x0000000000000000) at RecyclableObject.h:492:9 489 // Return whether the given Var is of the template parameter's type. 490 template <typename T> bool VarIs(Var aValue) 491 { -> 492 AssertMsg(aValue != nullptr, "VarIs: aValue is null"); 493 494 #if INT32VAR 495 bool isRecyclableObject = (((uintptr_t)aValue) >> VarTag_Shift) == 0; Target 0: (ch) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00000001030dcdef libChakraCore.dylib`bool Js::VarIs<Js::RecyclableObject>(aValue=0x0000000000000000) at RecyclableObject.h:492:9 frame #1: 0x00000001030dc6b5 libChakraCore.dylib`Js::TaggedNumber::Is(aValue=0x0000000000000000) at TaggedInt.inl:312:27 frame #2: 0x0000000103e6c4e5 libChakraCore.dylib`Js::JavascriptOperators::OP_SetElementI_JIT(instance=0x0000000000000000, index=0x0001000000000000, value=0x0001000037663465, scriptContext=0x0000000909008258, flags=PropertyOperation_None) at JavascriptOperators.cpp:4540:13 frame #3: 0x0000000103e6c4b9 libChakraCore.dylib`Js::JavascriptOperators::OP_SetElementI_UInt32(instance=0x0000000000000000, index=0, value=0x0001000037663465, scriptContext=0x0000000909008258, flags=PropertyOperation_None) at JavascriptOperators.cpp:4514:16 frame #4: 0x000000010264160e frame #5: 0x000000010440d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #6: 0x00000001040c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001020e67d0, entryPoint=(0x0000000102641400), args=Arguments @ 0x00007ffeefbfe358, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #7: 0x00000001040d29c7 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000102549120, data=0x0001000000000538, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #8: 0x0000000104083814 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x00000001025c7000, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #9: 0x00000001040839f8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x00000001025c7000, generator=0x0000000102549120, resolve=0x0000000102540840, reject=0x00000001025408a0) at JavascriptAsyncFunction.cpp:151:25 frame #10: 0x0000000104084487 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x000000010277aee0, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #11: 0x00000001042873d6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x000000010277f190, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #12: 0x000000010440d14e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #13: 0x00000001040c625b libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x000000010277f190, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfeb10, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #14: 0x00000001040c657f libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x000000010277f190, args=Arguments @ 0x00007ffeefbfeb80, scriptContext=0x0000000909008258, inScript=true) at JavascriptFunction.cpp:772:24 frame #15: 0x00000001040c63bc libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x000000010277f190, args=<unavailable>, scriptContext=0x0000000909008258, inScript=true) at JavascriptFunction.cpp:717:15 frame #16: 0x00000001040c6361 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x000000010277f190, args=<unavailable>, scriptContext=0x0000000909008258, inScript=true) at JavascriptFunction.cpp:832:16 frame #17: 0x0000000103128435 libChakraCore.dylib`JsCallFunction::$_67::operator(this=0x00007ffeefbfeff0, scriptContext=0x0000000909008258, _actionEntryPopper=0x00007ffeefbfefd0)(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const at Jsrt.cpp:2842:41 frame #18: 0x0000000103127dc4 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(this=0x00007ffeefbfef88, scriptContext=0x0000000909008258)::'lambda'(Js::ScriptContext*)::operator()(Js::ScriptContext*) const at JsrtInternal.h:237:16 frame #19: 0x0000000103127794 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::'lambda'(Js::ScriptContext*)>(fn=(anonymous class) @ 0x00007ffeefbfef88) at JsrtInternal.h:192:23 frame #20: 0x00000001030e3c56 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(fn=(anonymous class) @ 0x00007ffeefbfeff0) at JsrtInternal.h:235:27 frame #21: 0x00000001030e3c19 libChakraCore.dylib`::JsCallFunction(function=0x000000010277f190, args=0x00007ffeefbff0c0, cargs=1, result=0x00007ffeefbff0b8) at Jsrt.cpp:2804:12 frame #22: 0x000000010000bdeb ch`ChakraRTInterface::JsCallFunction(function=0x000000010277f190, arguments=0x00007ffeefbff0c0, argumentCount=1, result=0x00007ffeefbff0b8) at ChakraRtInterface.h:416:149 frame #23: 0x000000010001b35a ch`WScriptJsrt::CallbackMessage::CallFunction(this=0x000000010030c110, fileName="./test.js") at WScriptJsrt.cpp:1988:21 frame #24: 0x000000010001b23d ch`WScriptJsrt::CallbackMessage::Call(this=0x000000010030c110, fileName="./test.js") at WScriptJsrt.cpp:1959:12 frame #25: 0x000000010000543e ch`MessageQueue::ProcessAll(this=0x0000000100607440, fileName="./test.js") at MessageQueue.h:256:18 frame #26: 0x0000000100004ba0 ch`RunScript(fileName="./test.js", fileContents="function main() {\nconst v3 = async (v4,v5,v6,v7) => {\n};\nconst v10 = [13.37];\nconst v11 = {__proto__:v10,e:\"e\",valueOf:v3};\nfor (let v14 = v11; v14 < 1337; v14 = v14 ^ 2) {\n const v15 = v14++;\n}\nasync function v16(v17,v18,v19,v20,v21) {\n for (let v24 = 0; v24 < 1337; v24++) {\n const v25 = await v24;\n }\n for (let v29 = 0; v29 < 1337; v29 = v29 + 128) {\n (1337)[v29] = 929444965;\n }\n}\nconst v30 = v16();\nfor (const v34 in \"undefined\") {\n for (let v35 = 1; v35 < v34; v35 = v35 + v34) {\n const v36 = v35++;\n }\n}\nfor (const v39 in \"undefined\") {\n for (let v40 = 1; v40 < v39; v40 = v40 + \"O6WVmPSpHT\") {\n const v41 = v40++;\n }\n}\n}\nmain();\n", fileLength=692, fileContentsFinalizeCallback=(ch`WScriptJsrt::FinalizeFree(void*) at WScriptJsrt.cpp:208), bufferValue=0x0000000000000000, fullPath="/Users/cpang/Desktop/graduate/javascript/ChakraCore/test.js", parserStateCache=0x0000000000000000)(void*), void*, char*, void*) at ch.cpp:480:17 frame #27: 0x0000000100006f9e ch`ExecuteTest(fileName="./test.js") at ch.cpp:917:13 frame #28: 0x000000010000734c ch`ExecuteTestWithMemoryCheck(fileName="./test.js") at ch.cpp:967:10 frame #29: 0x0000000100007c89 ch`main(argc=2, c_argv=0x00007ffeefbff7d0) at ch.cpp:1274:20 frame #30: 0x00007fff2034b621 libdyld.dylib`start + 1 ``` How to reproduce: ``` - ./build.sh -j -d - ch poc.js ```
Assertion Error in `Js::VarIs<Js::RecyclableObject>`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6695/comments
0
2021-04-11T13:28:11Z
2021-04-15T07:11:45Z
https://github.com/chakra-core/ChakraCore/issues/6695
855,307,312
6,695
[ "chakra-core", "ChakraCore" ]
PoC: ``` function main() { function v0(v1,v2) { const v7 = new Int16Array(44915); for (let v10 = 0; v10 < 1337; v10++) { v7[v10] = 1337; v7[v10] = v2; } } const v12 = new Promise(v0); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000102e9e4f1 libChakraCore.dylib`Js::Throw::FatalJsReentrancyError() at Throw.cpp:103:9 100 #if ENABLE_JS_REENTRANCY_CHECK 101 void Throw::FatalJsReentrancyError() 102 { -> 103 AssertMsg(false, "Js reentrancy error!!"); 104 ReportFatalException(NULL, E_UNEXPECTED, Fatal_JsReentrancy_Error, 0); 105 } 106 #endif Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102e9e4f1 libChakraCore.dylib`Js::Throw::FatalJsReentrancyError() at Throw.cpp:103:9 frame #1: 0x00000001030cb6d7 libChakraCore.dylib`ThreadContext::AssertJsReentrancy(this=0x0000000101808c58) at ThreadContext.h:1789:13 frame #2: 0x0000000103c4d015 libChakraCore.dylib`Js::DynamicObject::CallToPrimitiveFunction(this=0x00007ffeefbf93b0)::$_0::operator()() const at DynamicType.cpp:464:24 frame #3: 0x0000000103c4c506 libChakraCore.dylib`void* ThreadContext::ExecuteImplicitCall<Js::DynamicObject::CallToPrimitiveFunction(void*, int, void**, Js::ScriptContext*)::$_0>(this=0x0000000101808c58, function=0x0000000908227ac0, flags=ImplicitCall_ToPrimitive, implicitCall=(anonymous class) @ 0x00007ffeefbf93b0)::$_0) at ThreadContext.h:1593:30 frame #4: 0x0000000103c4c1ed libChakraCore.dylib`Js::DynamicObject::CallToPrimitiveFunction(this=0x0000000908220360, toPrimitiveFunction=0x0000000908227ac0, propertyId=373, result=0x00007ffeefbf9530, requestContext=0x0000000101019858) at DynamicType.cpp:460:42 frame #5: 0x0000000103c4bf73 libChakraCore.dylib`int Js::DynamicObject::ToPrimitiveImpl<373>(this=0x0000000908220360, result=0x00007ffeefbf9530, requestContext=0x0000000101019858) at DynamicType.cpp:451:16 frame #6: 0x0000000103c4bce9 libChakraCore.dylib`Js::DynamicObject::ToPrimitive(this=0x0000000908220360, hint=HintNumber, result=0x00007ffeefbf9530, requestContext=0x0000000101019858) at DynamicType.cpp:398:20 frame #7: 0x000000010363df98 libChakraCore.dylib`void* Js::JavascriptConversion::OrdinaryToPrimitive<(Js::JavascriptHint)2>(value=0x0000000908220360, requestContext=0x0000000101019858) at JavascriptConversion.cpp:532:21 frame #8: 0x0000000103640592 libChakraCore.dylib`void* Js::JavascriptConversion::MethodCallToPrimitive<(Js::JavascriptHint)2>(value=0x0000000908220360, requestContext=0x0000000101019858) at JavascriptConversion.cpp:468:20 frame #9: 0x00000001036399b7 libChakraCore.dylib`void* Js::JavascriptConversion::ToPrimitive<(Js::JavascriptHint)2>(aValue=0x0000000908220360, requestContext=0x0000000101019858) at JavascriptConversion.cpp:416:20 frame #10: 0x000000010363b80c libChakraCore.dylib`Js::JavascriptConversion::ToUInt32_Full(aValue=0x0000000908220360, scriptContext=0x0000000101019858) at JavascriptConversion.cpp:1258:30 frame #11: 0x0000000102cbcae4 libChakraCore.dylib`Js::JavascriptConversion::ToUInt32(aValue=0x0000000908220360, scriptContext=0x0000000101019858) at JavascriptConversion.inl:86:13 frame #12: 0x0000000103670b85 libChakraCore.dylib`Js::JavascriptConversion::ToInt16(aValue=0x0000000908220360, scriptContext=0x0000000101019858) at JavascriptConversion.inl:195:20 frame #13: 0x00000001036af407 libChakraCore.dylib`bool MemsetConversion<short, &(Js::JavascriptConversion::ToInt16(void*, Js::ScriptContext*))>(this=0x00007ffeefbf97e0)::'lambda'()::operator()() const at JavascriptOperators.cpp:5190:23 frame #14: 0x00000001036af3a3 libChakraCore.dylib`Js::ImplicitCallFlags ThreadContext::TryWithDisabledImplicitCall<bool MemsetConversion<short, &(Js::JavascriptConversion::ToInt16(void*, Js::ScriptContext*))>(void*, Js::ScriptContext*, short*)::'lambda'()>(this=0x0000000101808c58, fn=(anonymous class) @ 0x00007ffeefbf97e0) at ThreadContext.h:370:9 frame #15: 0x0000000103674a0a libChakraCore.dylib`bool MemsetConversion<short, &(Js::JavascriptConversion::ToInt16(void*, Js::ScriptContext*))>(value=0x0000000908220360, scriptContext=0x0000000101019858, result=0x00007ffeefbf99b2) at JavascriptOperators.cpp:5188:70 frame #16: 0x0000000103673865 libChakraCore.dylib`Js::JavascriptOperators::OP_Memset(instance=0x0000000908227740, start=525, value=0x0000000908220360, length=812, scriptContext=0x0000000101019858) at JavascriptOperators.cpp:5220:9 frame #17: 0x00000009082e016e frame #18: 0x000000010360cf17 libChakraCore.dylib`Js::InterpreterStackFrame::CallLoopBody(this=0x00007ffeefbfad90, address=(0x00000009082e0000))(Js::RecyclableObject*, Js::CallInfo, ...)) at InterpreterStackFrame.cpp:6358:13 frame #19: 0x000000010360c574 libChakraCore.dylib`Js::InterpreterStackFrame::DoLoopBodyStart(this=0x00007ffeefbfad90, loopNumber=0, layoutSize=SmallLayout, doProfileLoopCheck=false, isFirstIteration=false) at InterpreterStackFrame.cpp:6162:35 ``` How to reproduce: ``` - ./build.sh -d -j - ch poc.js ```
Throw a `FatalJsReentrancyError`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6694/comments
1
2021-04-11T13:07:00Z
2021-04-15T09:05:24Z
https://github.com/chakra-core/ChakraCore/issues/6694
855,302,746
6,694
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v0 = {}; async function v1(v2,v3,v4,v5,v6) { const v7 = ` Object; `; for (let v9 in v0) { const v10 = v9++; const v12 = 1337 - v7; const v13 = await v10; } const v14 = v1(); } const v15 = v1(); } main(); ``` Backtrace: ``` * thread #6, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000102654240 libChakraCore.dylib`EncoderMD::GetMod(this=0x000070000904b158, symOpnd=0x00000009092952b0, pDispSize=0x0000700009049a48, rmReg=0x0000700009049a21) at EncoderMD.cpp:263:9 260 } 261 else 262 { -> 263 Assert(offset != 0); 264 } 265 return GetMod((size_t)offset + (size_t)symOpnd->m_offset, rmReg == RegRBP, pDispSize); 266 Target 0: (ch) stopped. (lldb) bt * thread #6, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102654240 libChakraCore.dylib`EncoderMD::GetMod(this=0x000070000904b158, symOpnd=0x00000009092952b0, pDispSize=0x0000700009049a48, rmReg=0x0000700009049a21) at EncoderMD.cpp:263:9 frame #1: 0x0000000102654500 libChakraCore.dylib`EncoderMD::EmitModRM(this=0x000070000904b158, instr=0x0000000909295350, opnd=0x00000009092952b0, reg1='\b') at EncoderMD.cpp:345:21 frame #2: 0x0000000102656b5f libChakraCore.dylib`EncoderMD::Encode(this=0x000070000904b158, instr=0x0000000909295350, pc=", beginCodeAddress="HοΏ½@οΏ½\x01") at EncoderMD.cpp:898:37 frame #3: 0x000000010222a448 libChakraCore.dylib`Encoder::Encode(this=0x000070000904b150) at Encoder.cpp:223:33 frame #4: 0x000000010226d092 libChakraCore.dylib`Func::TryCodegen(this=0x000070000904c150) at Func.cpp:561:17 frame #5: 0x000000010226bfef libChakraCore.dylib`Func::Codegen(alloc=0x000070000904c6e0, workItem=0x0000000909241030, threadContextInfo=0x000000010180e858, scriptContextInfo=0x000000090800ee58, outputData=0x000070000904cb20, epInfo=0x000000090912d1b0, runtimeInfo=0x0000000000000000, polymorphicInlineCacheInfo=0x00000009091d2a40, codeGenAllocators=0x0000000908809658, codeGenProfiler=0x0000000000000000, isBackgroundJIT=true) at Func.cpp:325:18 frame #6: 0x00000001025bd931 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100605328, pageAllocator=0x00000009077040f8, workItemData=0x00000009093045c0, jitWriteData=0x000070000904cb20, foreground=false, epInfo=0x000000090912d1b0) at NativeCodeGenerator.cpp:890:9 frame #7: 0x00000001025c00b8 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100605328, pageAllocator=0x00000009077040f8, workItem=0x0000000909304598, foreground=false) at NativeCodeGenerator.cpp:1007:5 frame #8: 0x00000001025c37f4 libChakraCore.dylib`NativeCodeGenerator::Process(this=0x0000000100605328, job=0x00000009093045a0, threadData=0x00000009077040d8) at NativeCodeGenerator.cpp:1907:13 frame #9: 0x0000000102678541 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Process(this=0x0000000100605498, job=0x00000009093045a0, threadData=0x00000009077040d8) at Jobs.cpp:1037:36 frame #10: 0x0000000102678b26 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Run(this=0x0000000100605498, threadData=0x00000009077040d8) at Jobs.cpp:1135:44 frame #11: 0x0000000102676062 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::StaticThreadProc(lpParam=0x00000009077040d8) at Jobs.cpp:1319:20 frame #12: 0x000000010209da83 libChakraCore.dylib`CorUnix::CPalThread::ThreadEntry(pvParam=0x0000000908808200) at pal_thread.cpp:1605:16 frame #13: 0x00007fff20330950 libsystem_pthread.dylib`_pthread_start + 224 frame #14: 0x00007fff2032c47b libsystem_pthread.dylib`thread_start + 15 ``` How to reproduce it: ``` - ./build.sh -d -j - ch poc.js ```
Assertion Error in `EncoderMD::GetMod`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6693/comments
0
2021-04-11T12:49:36Z
2021-04-15T06:56:49Z
https://github.com/chakra-core/ChakraCore/issues/6693
855,299,134
6,693
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { async function v0(v1,v2,v3,v4,v5) { const v6 = ` Object; `; for (const v9 in v2) { for (const v11 in v2) { const v12 = {b:v6,e:v11,...v5,...v11,...1,...v4}; const v13 = await v12; } const v16 = [13.37,v9]; const v18 = [1337,1337,1337,1337,Function]; const v19 = {a:v18,c:v5,toString:v16}; const v20 = {toString:13.37,a:v19}; function v21(v22,v23) { const v25 = [13.37]; const v27 = Reflect.get(v25,v20); } } const v28 = v0(RegExp,v1); } const v29 = v0(); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00000001044c60e0 libChakraCore.dylib`Js::InterpreterStackFrame::OP_StSlot(this=0x0000000102af0c00, instance=0x0000000000000000, slotIndex=2, value=0x0000000102e508a0) at InterpreterStackFrame.cpp:9315:28 9312 // We emit OpCode::StSlot in the bytecode only for scope slot arrays, which are not recyclable objects. 9313 if (!PHASE_OFF(ClosureRangeCheckPhase, this->m_functionBody)) 9314 { -> 9315 if ((uintptr_t)((Var*)instance)[ScopeSlots::EncodedSlotCountSlotIndex] <= (uintptr_t)(slotIndex - ScopeSlots::FirstSlotIndex)) 9316 { 9317 Js::Throw::FatalInternalError(); 9318 } Target 0: (ch) stopped. (lldb) bt 15 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00000001044c60e0 libChakraCore.dylib`Js::InterpreterStackFrame::OP_StSlot(this=0x0000000102af0c00, instance=0x0000000000000000, slotIndex=2, value=0x0000000102e508a0) at InterpreterStackFrame.cpp:9315:28 frame #1: 0x00000001044ff3df libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x0000000102af0c00) at InterpreterHandler.inl:269:3 frame #2: 0x00000001044938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x0000000102af0c00) at InterpreterStackFrame.cpp:3472:20 frame #3: 0x00000001044923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x0000000102ae67d0, args=ArgumentReader @ 0x00007ffeefbfe200, returnAddress=0x0000000102c80f92, addressOfReturnAddress=0x00007ffeefbfe248, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #4: 0x0000000104491480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfe260) at InterpreterStackFrame.cpp:1833:16 frame #5: 0x0000000102c80f92 frame #6: 0x0000000104c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #7: 0x00000001048c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000102ae67d0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe358, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #8: 0x00000001048d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000102c49120, data=0x0000000102e505e0, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #9: 0x0000000104883904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x0000000102e4d690, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #10: 0x0000000104883ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x0000000102e4d690, generator=0x0000000102c49120, resolve=0x0000000102c404e0, reject=0x0000000102c40540) at JavascriptAsyncFunction.cpp:151:25 frame #11: 0x0000000104884577 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x0000000102e4d5b0, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #12: 0x0000000104a873e6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x0000000102e4a5f0, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #13: 0x0000000104c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #14: 0x00000001048c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000102e4a5f0, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfeb10, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 ``` How to reproduce it: ``` - ./build.sh -d -j - ch poc.js ```
Invalid Memory Access in `OP_StSlot`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6692/comments
2
2021-04-10T17:32:25Z
2021-04-18T14:58:13Z
https://github.com/chakra-core/ChakraCore/issues/6692
855,117,875
6,692
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v0 = {}; async function v1(v2,v3,v4,v5,v6) { function v7(v8) { } const v9 = v7; for (const v10 in v0) { const v12 = await 320832.93626390724; } const v13 = v1(); let v15 = 1337; for (let v17 = 0; v17 < v15; v17 = v17 && 350074.8305491025) { v15 = v17; } const v19 = new Promise(v9); } const v20 = v1(); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x841f0f66db) frame #0: 0x00000001026b72ec libChakraCore.dylib`Js::Type::GetEntryPoint(this=0x000000841f0f66c3) const at Type.h:51:57 48 inline TypeId GetTypeId() const { return typeId; } 49 void SetTypeId(TypeId typeId) { this->typeId = typeId; } 50 RecyclableObject* GetPrototype() const { return prototype; } -> 51 JavascriptMethod GetEntryPoint() const { return entryPoint; } 52 JavascriptLibrary* GetLibrary() const { return javascriptLibrary; } 53 ScriptContext * GetScriptContext() const; 54 Recycler * GetRecycler() const; Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x841f0f66db) * frame #0: 0x00000001026b72ec libChakraCore.dylib`Js::Type::GetEntryPoint(this=0x000000841f0f66c3) const at Type.h:51:57 frame #1: 0x0000000103686e3d libChakraCore.dylib`Js::RecyclableObject::GetEntryPoint(this=0x0000000102206f0e) const at RecyclableObject.cpp:175:33 frame #2: 0x0000000103036ee4 libChakraCore.dylib`Js::JavascriptConversion::IsCallable(aValue=0x0000000102206f0e) at JavascriptConversion.cpp:41:47 frame #3: 0x0000000103036e47 libChakraCore.dylib`Js::JavascriptConversion::IsCallable(aValue=0x0000000102206f0e) at JavascriptConversion.cpp:35:16 frame #4: 0x0000000103480b95 libChakraCore.dylib`Js::JavascriptPromise::NewInstance(function=0x00000009078f0100, callInfo=(Count = 2, Flags = CallFlags_New, unused = 0)) at JavascriptPromise.cpp:46:37 frame #5: 0x0000000907c01679 frame #6: 0x000000010360d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #7: 0x00000001032c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001020e67d0, entryPoint=(0x0000000907c01000), args=Arguments @ 0x00007ffeef40df48, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #8: 0x00000001032d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000909434960, data=0x00000001020e5030, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #9: 0x0000000103283904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x000000090943b460, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #10: 0x0000000103283ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x000000090943b460, generator=0x0000000909434960, resolve=0x000000090943d4e0, reject=0x000000090943d540) at JavascriptAsyncFunction.cpp:151:25 frame #11: 0x00000001032837b6 libChakraCore.dylib`Js::JavascriptAsyncFunction::BeginAsyncFunctionExecution(generator=0x0000000909434960) at JavascriptAsyncFunction.cpp:73:9 frame #12: 0x00000001032835a3 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncFunctionImplementation(function=0x0000000907b27880, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:52:12 frame #13: 0x0000000907c0151d frame #14: 0x000000010360d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #15: 0x00000001032c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001020e67d0, entryPoint=(0x0000000907c01000), args=Arguments @ 0x00007ffeef40e5d8, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #16: 0x00000001032d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000909434900, data=0x00000001020e5030, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #17: 0x0000000103283904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x000000090943b3f0, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #18: 0x0000000103283ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x000000090943b3f0, generator=0x0000000909434900, resolve=0x000000090943d420, reject=0x000000090943d480) at JavascriptAsyncFunction.cpp:151:25 frame #19: 0x00000001032837b6 libChakraCore.dylib`Js::JavascriptAsyncFunction::BeginAsyncFunctionExecution(generator=0x0000000909434900) at JavascriptAsyncFunction.cpp:73:9 ``` How to reproduce it: ``` - ./build.sh -d -j - ch poc.js ``` Its backtrace is similar with #6690. I am not sure if their root cause are same.
Invalid memory access in `GetEntryPoint`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6691/comments
2
2021-04-10T17:14:44Z
2021-04-16T18:47:07Z
https://github.com/chakra-core/ChakraCore/issues/6691
855,114,421
6,691
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v3 = [13.37,13.37,13.37,13.37]; const v5 = [1337,1337,1337,1337,1337]; const v6 = {__proto__:v5,a:"description",b:1337,c:undefined,length:1337,valueOf:v3}; async function v7(v8,v9,v10,v11,v12) { const v13 = ` Object; `; for (const v15 in v6) { const v18 = (1000000.0).__proto__; for (const v19 in v15) { const v20 = {b:v13,e:v19,...v12,...v19,...1,...v11}; const v21 = await v20; } } const v22 = v7(); } const v23 = v7(); } main(); ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00000001038edf1c libChakraCore.dylib`Js::Type::GetTypeId(this=0x0000000000000000) const at Type.h:48:50 45 46 public: 47 static DWORD GetJavascriptLibraryOffset() { return offsetof(Type, javascriptLibrary); } -> 48 inline TypeId GetTypeId() const { return typeId; } 49 void SetTypeId(TypeId typeId) { this->typeId = typeId; } 50 RecyclableObject* GetPrototype() const { return prototype; } 51 JavascriptMethod GetEntryPoint() const { return entryPoint; } Target 0: (ch) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00000001038edf1c libChakraCore.dylib`Js::Type::GetTypeId(this=0x0000000000000000) const at Type.h:48:50 frame #1: 0x00000001038ede3d libChakraCore.dylib`Js::RecyclableObject::GetTypeId(this=0x0000000102be6828) const at RecyclableObject.inl:13:33 frame #2: 0x0000000104662e35 libChakraCore.dylib`Js::JavascriptOperators::IsUndefinedOrNull(instance=0x0000000102be6828) at JavascriptOperators.cpp:11031:69 frame #3: 0x000000010465b548 libChakraCore.dylib`Js::JavascriptOperators::GetPropertyObject(instance=0x0000000102be6828, scriptContext=0x000000010201f658, propertyObject=0x00007ffeefbfe088) at JavascriptOperators.cpp:2133:13 frame #4: 0x0000000104697e10 libChakraCore.dylib`void* Js::JavascriptOperators::PatchGetValue<true, Js::InlineCache>(Js::FunctionBody*, Js::InlineCache*, unsigned int, void*, int) [inlined] void* Js::JavascriptOperators::PatchGetValueWithThisPtr<true, Js::InlineCache>(functionBody=0x0000000102d4c3e0, inlineCache=0x0000000102b8aef0, inlineCacheIndex=0, instance=0x0000000102be6828, propertyId=487, thisInstance=0x0000000102be6828) at JavascriptOperators.cpp:7950:22 frame #5: 0x0000000104697d7d libChakraCore.dylib`void* Js::JavascriptOperators::PatchGetValue<true, Js::InlineCache>(functionBody=0x0000000102d4c3e0, inlineCache=0x0000000102b8aef0, inlineCacheIndex=0, instance=0x0000000102be6828, propertyId=487) at JavascriptOperators.cpp:7936 frame #6: 0x0000000102e813bb frame #7: 0x0000000104c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #8: 0x00000001048c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000102be6820, entryPoint=(0x0000000102e81000), args=Arguments @ 0x00007ffeefbfe358, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #9: 0x00000001048d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000102d49360, data=0x0000000102f17fe0, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #10: 0x0000000104883904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x0000000102f1b380, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #11: 0x0000000104883ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x0000000102f1b380, generator=0x0000000102d49360, resolve=0x0000000102f1a060, reject=0x0000000102f1a0c0) at JavascriptAsyncFunction.cpp:151:25 frame #12: 0x0000000104884577 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x0000000102f1b2a0, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #13: 0x0000000104a873e6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x0000000102f1c1e0, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #14: 0x0000000104c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #15: 0x00000001048c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000102f1c1e0, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfeb10, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #16: 0x00000001048c65ff libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x0000000102f1c1e0, args=Arguments @ 0x00007ffeefbfeb80, scriptContext=0x000000010201f658, inScript=true) at JavascriptFunction.cpp:772:24 frame #17: 0x00000001048c643c libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x0000000102f1c1e0, args=<unavailable>, scriptContext=0x000000010201f658, inScript=true) at JavascriptFunction.cpp:717:15 frame #18: 0x00000001048c63e1 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x0000000102f1c1e0, args=<unavailable>, scriptContext=0x000000010201f658, inScript=true) at JavascriptFunction.cpp:832:16 frame #19: 0x0000000103928525 libChakraCore.dylib`JsCallFunction::$_67::operator(this=0x00007ffeefbfeff0, scriptContext=0x000000010201f658, _actionEntryPopper=0x00007ffeefbfefd0)(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const at Jsrt.cpp:2842:41 frame #20: 0x0000000103927eb4 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(this=0x00007ffeefbfef88, scriptContext=0x000000010201f658)::'lambda'(Js::ScriptContext*)::operator()(Js::ScriptContext*) const at JsrtInternal.h:237:16 frame #21: 0x0000000103927884 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::'lambda'(Js::ScriptContext*)>(fn=(anonymous class) @ 0x00007ffeefbfef88) at JsrtInternal.h:192:23 frame #22: 0x00000001038e3d46 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(fn=(anonymous class) @ 0x00007ffeefbfeff0) at JsrtInternal.h:235:27 frame #23: 0x00000001038e3d09 libChakraCore.dylib`::JsCallFunction(function=0x0000000102f1c1e0, args=0x00007ffeefbff0c0, cargs=1, result=0x00007ffeefbff0b8) at Jsrt.cpp:2804:12 frame #24: 0x000000010000bdeb ch`ChakraRTInterface::JsCallFunction(function=0x0000000102f1c1e0, arguments=0x00007ffeefbff0c0, argumentCount=1, result=0x00007ffeefbff0b8) at ChakraRtInterface.h:416:149 frame #25: 0x000000010001b35a ch`WScriptJsrt::CallbackMessage::CallFunction(this=0x0000000102c04700, fileName="test.js") at WScriptJsrt.cpp:1988:21 frame #26: 0x000000010001b23d ch`WScriptJsrt::CallbackMessage::Call(this=0x0000000102c04700, fileName="test.js") at WScriptJsrt.cpp:1959:12 frame #27: 0x000000010000543e ch`MessageQueue::ProcessAll(this=0x00000001007088c0, fileName="test.js") at MessageQueue.h:256:18 frame #28: 0x0000000100004ba0 ch`RunScript(fileName="test.js", fileContents="function main() {\nconst v3 = [13.37,13.37,13.37,13.37];\nconst v5 = [1337,1337,1337,1337,1337];\nconst v6 = {__proto__:v5,a:\"description\",b:1337,c:undefined,length:1337,valueOf:v3};\nasync function v7(v8,v9,v10,v11,v12) {\n const v13 = `\n Object;\n `;\n for (const v15 in v6) {\n const v18 = (1000000.0).__proto__;\n for (const v19 in v15) {\n const v20 = {b:v13,e:v19,...v12,...v19,...1,...v11};\n const v21 = await v20;\n }\n }\n const v22 = v7();\n}\nconst v23 = v7();\n}\nmain();\n", fileLength=532, fileContentsFinalizeCallback=(ch`WScriptJsrt::FinalizeFree(void*) at WScriptJsrt.cpp:208), bufferValue=0x0000000000000000, fullPath="/Users/cpang/Desktop/graduate/javascript/ChakraCore/test.js", parserStateCache=0x0000000000000000)(void*), void*, char*, void*) at ch.cpp:480:17 frame #29: 0x0000000100006f9e ch`ExecuteTest(fileName="test.js") at ch.cpp:917:13 frame #30: 0x000000010000734c ch`ExecuteTestWithMemoryCheck(fileName="test.js") at ch.cpp:967:10 frame #31: 0x0000000100007c89 ch`main(argc=2, c_argv=0x00007ffeefbff7d8) at ch.cpp:1274:20 frame #32: 0x00007fff2034b621 libdyld.dylib`start + 1 frame #33: 0x00007fff2034b621 libdyld.dylib`start + 1 ``` How to reproduce it: ``` - ./build.sh -d -j - ./ch poc.js ```
Invalid Memory Access in `GetTypeId`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6690/comments
0
2021-04-10T11:49:46Z
2021-04-18T14:58:13Z
https://github.com/chakra-core/ChakraCore/issues/6690
855,049,814
6,690
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = Array(4294967295); const v3 = v2.copyWithin(); } main(); ``` backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000103084441 libChakraCore.dylib`Js::JavascriptArray::CopyWithinHelper(pArr=0x0000000907a274c0, typedArrayBase=0x0000000000000000, obj=0x0000000907a274c0, length=4294967295, args=0x00007ffeefbfb6e8, scriptContext=0x0000000101819058) at JavascriptArray.cpp:9481:13 9478 { 9479 Assert(fromVal < MaxArrayLength); 9480 Assert(toVal < MaxArrayLength); -> 9481 Assert(direction == -1 || (fromVal + count < MaxArrayLength && toVal + count < MaxArrayLength)); 9482 9483 uint32 fromIndex = static_cast<uint32>(fromVal); 9484 uint32 toIndex = static_cast<uint32>(toVal); Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000103084441 libChakraCore.dylib`Js::JavascriptArray::CopyWithinHelper(pArr=0x0000000907a274c0, typedArrayBase=0x0000000000000000, obj=0x0000000907a274c0, length=4294967295, args=0x00007ffeefbfb6e8, scriptContext=0x0000000101819058) at JavascriptArray.cpp:9481:13 frame #1: 0x000000010308349c libChakraCore.dylib`Js::JavascriptArray::EntryCopyWithin(function=0x0000000907a84e40, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptArray.cpp:9348:16 frame #2: 0x000000010344d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #3: 0x00000001031062db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000907a84e40, entryPoint=(libChakraCore.dylib`Js::JavascriptArray::EntryCopyWithin(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptArray.cpp:9334), args=Arguments @ 0x00007ffeefbfb828, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #4: 0x0000000102e6c07a libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfca30, playout=0x00000009077730ed, function=0x0000000907a84e40, flags=2, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3988:54 frame #5: 0x0000000102e6b971 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfca30, playout=0x00000009077730ed, function=0x0000000907a84e40, flags=0, profileId=1, inlineCacheIndex=0, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #6: 0x0000000102d44dd8 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfca30, playout=0x00000009077730ed)0> > > const __unaligned*) at InterpreterStackFrame.h:520:115 frame #7: 0x0000000102d398f6 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfca30) at InterpreterHandler.inl:91:3 frame #8: 0x0000000102cd38f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfca30) at InterpreterStackFrame.cpp:3472:20 frame #9: 0x0000000102cd23fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000009077c6730, args=ArgumentReader @ 0x00007ffeefbfcf30, returnAddress=0x0000000907a60f9a, addressOfReturnAddress=0x00007ffeefbfcf78, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #10: 0x0000000102cd1480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfcf90) at InterpreterStackFrame.cpp:1833:16 frame #11: 0x0000000907a60f9a frame #12: 0x000000010344d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #13: 0x00000001031062db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000009077c6730, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfd0c0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #14: 0x0000000102e6be7f libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe290, playout=0x000000090776cdd0, function=0x00000009077c6730, flags=16, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3973:21 frame #15: 0x0000000102e6b971 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe290, playout=0x000000090776cdd0, function=0x00000009077c6730, flags=0, profileId=0, inlineCacheIndex=0, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #16: 0x0000000102d44dd8 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfe290, playout=0x000000090776cdd0)0> > > const __unaligned*) at InterpreterStackFrame.h:520:115 frame #17: 0x0000000102d398f6 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfe290) at InterpreterHandler.inl:91:3 frame #18: 0x0000000102cd38f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfe290) at InterpreterStackFrame.cpp:3472:20 frame #19: 0x0000000102cd23fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000009077c66e0, args=ArgumentReader @ 0x00007ffeefbfe780, returnAddress=0x0000000907a60fa2, addressOfReturnAddress=0x00007ffeefbfe7c8, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 ``` How to reproduce it: ``` - ./build.sh -d -j - ./ch test.js ```
Assertion Error in `CopyWithinHelper`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6689/comments
1
2021-04-09T16:04:01Z
2021-04-09T18:20:06Z
https://github.com/chakra-core/ChakraCore/issues/6689
854,657,948
6,689
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { do { delete isNaN.length; const v4 = Object.getOwnPropertyNames(isNaN); } while (16 < 1337); } main(); // STDERR: // ASSERTION 12205: (/src/chakracore/lib/Runtime/Types/SimpleTypeHandler.cpp, line 664) !GetIsLocked() // Failure: (!GetIsLocked()) ``` Backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000104548134 libChakraCore.dylib`Js::SimpleTypeHandler<2ul>::DeleteProperty(this=0x0000000102447640, instance=0x0000000102406740, propertyId=206, propertyOperationFlags=PropertyOperation_None) at SimpleTypeHandler.cpp:664:17 661 if (descriptors[index].Attributes & PropertyDeleted) 662 { 663 // A locked type should not have deleted properties -> 664 Assert(!GetIsLocked()); 665 return true; 666 } 667 if (!(descriptors[index].Attributes & PropertyConfigurable)) Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000104548134 libChakraCore.dylib`Js::SimpleTypeHandler<2ul>::DeleteProperty(this=0x0000000102447640, instance=0x0000000102406740, propertyId=206, propertyOperationFlags=PropertyOperation_None) at SimpleTypeHandler.cpp:664:17 frame #1: 0x000000010444b884 libChakraCore.dylib`Js::DynamicObject::DeleteProperty(this=0x0000000102406740, propertyId=206, flags=PropertyOperation_None) at DynamicType.cpp:336:34 frame #2: 0x00000001040cc3fe libChakraCore.dylib`Js::JavascriptFunction::DeleteProperty(this=0x0000000102406740, propertyId=206, flags=PropertyOperation_None) at JavascriptFunction.cpp:3055:38 frame #3: 0x0000000103e67188 libChakraCore.dylib`int Js::JavascriptOperators::DeleteProperty_Impl<false>(instance=0x0000000102406740, propertyId=206, propertyOperationFlags=PropertyOperation_None) at JavascriptOperators.cpp:3130:27 frame #4: 0x0000000103e67151 libChakraCore.dylib`Js::JavascriptOperators::DeleteProperty(instance=0x0000000102406740, propertyId=206, propertyOperationFlags=PropertyOperation_None) at JavascriptOperators.cpp:3074:16 frame #5: 0x0000000103e6739d libChakraCore.dylib`Js::JavascriptOperators::OP_DeleteProperty(instance=0x0000000102406740, propertyId=206, scriptContext=0x0000000101017c58, propertyOperationFlags=PropertyOperation_None) at JavascriptOperators.cpp:3149:13 frame #6: 0x0000000103cc5291 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_DeleteFld<Js::OpLayoutT_ElementC<Js::LayoutSizePolicy<(Js::LayoutSize)0> > __unaligned>(this=0x00007ffeefbfc9e0, playout=0x000000010246006d)0> > __unaligned const __unaligned*) at InterpreterStackFrame.cpp:7674:22 frame #7: 0x0000000103cfda58 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfc9e0) at InterpreterHandler.inl:191:3 frame #8: 0x0000000103c938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfc9e0) at InterpreterStackFrame.cpp:3472:20 frame #9: 0x0000000103c923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001021e6730, args=ArgumentReader @ 0x00007ffeefbfcf10, returnAddress=0x0000000102480f9a, addressOfReturnAddress=0x00007ffeefbfcf58, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #10: 0x0000000103c91480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfcf70) at InterpreterStackFrame.cpp:1833:16 frame #11: 0x0000000102480f9a frame #12: 0x000000010440d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #13: 0x00000001040c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001021e6730, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfd0a0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #14: 0x0000000103e2be7f libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe270, playout=0x000000010218cdd0, function=0x00000001021e6730, flags=16, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3973:21 frame #15: 0x0000000103e2b971 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe270, playout=0x000000010218cdd0, function=0x00000001021e6730, flags=0, profileId=0, inlineCacheIndex=0, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #16: 0x0000000103d04dd8 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfe270, playout=0x000000010218cdd0)0> > > const __unaligned*) at InterpreterStackFrame.h:520:115 frame #17: 0x0000000103cf98f6 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfe270) at InterpreterHandler.inl:91:3 frame #18: 0x0000000103c938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfe270) at InterpreterStackFrame.cpp:3472:20 frame #19: 0x0000000103c923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001021e66e0, args=ArgumentReader @ 0x00007ffeefbfe760, returnAddress=0x0000000102480fa2, addressOfReturnAddress=0x00007ffeefbfe7a8, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 ``` How to reproduce it: ``` - ./build.sh -d -j - ./ch poc.js ```
Assertion Error in `DeleteProperty`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6688/comments
2
2021-04-09T15:57:25Z
2021-04-14T17:51:08Z
https://github.com/chakra-core/ChakraCore/issues/6688
854,652,290
6,688
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { try { const v1 = BigInt(); } catch(v2) { } const v3 = async (v4,v5,v6) => { for (const v8 in "pS1LFZI9uc") { const v10 = typeof BigInt; for (const v12 in "pS1LFZI9uc") { const v13 = await v12; } } }; const v14 = v3(); const v15 = v3(); } main(); ``` backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000102ec3a5c libChakraCore.dylib`Js::InlinedFrameWalker::FromPhysicalFrame(self=0x00007ffeefbfc350, physicalFrame=0x00007ffeefbfc3a8, parent=0x00000001007e6af0, fromBailout=true, loopNum=-1, stackWalker=0x00007ffeefbfc320, useInternalFrameInfo=false, noAlloc=false) at JavascriptStackWalker.cpp:1289:9 1286 entryPointInfo = (Js::EntryPointInfo*)parentFunctionBody->GetEntryPointFromNativeAddress((DWORD_PTR)nativeCodeAddress); 1287 } 1288 -> 1289 AssertMsg(entryPointInfo != nullptr, "Inlined frame should resolve to the right parent address"); 1290 if (entryPointInfo->HasInlinees()) 1291 { 1292 void *entry = reinterpret_cast<void*>(entryPointInfo->GetNativeAddress()); Target 0: (ch) stopped. (lldb) bt 20 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102ec3a5c libChakraCore.dylib`Js::InlinedFrameWalker::FromPhysicalFrame(self=0x00007ffeefbfc350, physicalFrame=0x00007ffeefbfc3a8, parent=0x00000001007e6af0, fromBailout=true, loopNum=-1, stackWalker=0x00007ffeefbfc320, useInternalFrameInfo=false, noAlloc=false) at JavascriptStackWalker.cpp:1289:9 frame #1: 0x0000000102ec41c0 libChakraCore.dylib`Js::JavascriptStackWalker::UpdateFrame(this=0x00007ffeefbfc320, includeInlineFrames=true) at JavascriptStackWalker.cpp:561:56 frame #2: 0x0000000102ec1f13 libChakraCore.dylib`Js::JavascriptStackWalker::Walk(this=0x00007ffeefbfc320, includeInlineFrames=true) at JavascriptStackWalker.cpp:783:15 frame #3: 0x0000000102ec56bf libChakraCore.dylib`Js::JavascriptStackWalker::GetCaller(this=0x00007ffeefbfc320, ppFunc=0x00007ffeefbfc400, includeInlineFrames=true) at JavascriptStackWalker.cpp:794:22 frame #4: 0x0000000102ec6082 libChakraCore.dylib`Js::JavascriptStackWalker::GetCaller(ppFunc=0x00007ffeefbfc400, scriptContext=0x0000000100819858) at JavascriptStackWalker.cpp:1181:23 frame #5: 0x0000000102e6324b libChakraCore.dylib`Js::JavascriptOperators::OP_GetRootProperty(instance=0x00000001007e4000, propertyId=266, info=0x00007ffeefbfc450, scriptContext=0x0000000100819858) at JavascriptOperators.cpp:2187:13 frame #6: 0x0000000102e85244 libChakraCore.dylib`Js::JavascriptOperators::PatchGetRootValueNoFastPath(functionBody=0x000000090834c3e0, inlineCache=0x000000010078af10, inlineCacheIndex=3, object=0x00000001007e4000, propertyId=266) at JavascriptOperators.cpp:8194:16 frame #7: 0x0000000102e85164 libChakraCore.dylib`Js::JavascriptOperators::PatchGetRootValueNoFastPath_Var(functionBody=0x000000090834c3e0, inlineCache=0x000000010078af10, inlineCacheIndex=3, instance=0x00000001007e4000, propertyId=266) at JavascriptOperators.cpp:8178:13 frame #8: 0x0000000102edc1f3 libChakraCore.dylib`void* Js::ProfilingHelpers::ProfiledLdFld<true, false, false>(instance=0x00000001007e4000, propertyId=266, inlineCache=0x000000010078af10, inlineCacheIndex=3, functionBody=0x000000090834c3e0, thisInstance=0x00000001007e4000) at ProfilingHelpers.cpp:996:21 frame #9: 0x0000000102edc3c0 libChakraCore.dylib`void* Js::ProfilingHelpers::ProfiledLdFldForTypeOf<true, false, false>(instance=0x00000001007e4000, propertyId=266, inlineCache=0x000000010078af10, inlineCacheIndex=3, functionBody=0x000000090834c3e0) at ProfilingHelpers.cpp:1068:15 frame #10: 0x0000000102cc51a4 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledGetRootPropertyForTypeOf<Js::OpLayoutT_ElementRootCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const __unaligned>(this=0x00000009083502f0, playout=0x000000090836a01e)0> > const __unaligned __unaligned*) at InterpreterStackFrame.cpp:4207:21 frame #11: 0x0000000102cbec43 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiledExtendedOpcodePrefix(this=0x00000009083502f0, ip="*\x12\x13E\b\x12οΏ½\x01") at InterpreterHandler.inl:181:1 frame #12: 0x0000000102d03b2f libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00000009083502f0) at InterpreterLoop.inl:357:13 frame #13: 0x0000000102c938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00000009083502f0) at InterpreterStackFrame.cpp:3472:20 frame #14: 0x0000000102c923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001007e6af0, args=ArgumentReader @ 0x00007ffeefbfe1f0, returnAddress=0x0000000908380f92, addressOfReturnAddress=0x00007ffeefbfe238, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #15: 0x0000000102c91480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfe250) at InterpreterStackFrame.cpp:1833:16 frame #16: 0x0000000908380f92 frame #17: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #18: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001007e6af0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe348, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #19: 0x00000001030d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x00000009083490c0, data=0x000000090835b300, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 ``` How to reproduce: ``` - ./build.sh -d -j - ./ch ./poc.js ```
Assertion Error in `FromPhysicalFrame`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6687/comments
1
2021-04-09T03:10:34Z
2021-04-09T18:07:58Z
https://github.com/chakra-core/ChakraCore/issues/6687
854,111,149
6,687
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v2 = [13.37,13.37,13.37,13.37,13.37]; async function v4(v5,v6,v7,v8) { const v10 = 0; for (let v14 = 0; v14 < 8; v14++) { v5["vEBD7ei78q"] = v14; } for (let v16 = 1; v16 < 1337; v16++) { const v17 = v2.__proto__; const v23 = [13.37,13.37,-2.2250738585072014e-308,13.37,13.37]; const v24 = v23.length; const v25 = "-4294967296"; const v26 = 7; function* v28(v29,v30,v31,...v32) { } let v33 = -2.2250738585072014e-308; const v34 = v28(v33,Object,Object); const v35 = 13.37; const v36 = 2384357829; const v37 = await "-4294967296"; const v38 = --v33; } const v39 = 128; } const v40 = v4("vEBD7ei78q"); } main(); ``` backtrace: ``` * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00000001024e658c libChakraCore.dylib`LinearScan::GeneratorBailIn::InsertRestoreSymbols(this=0x0000700006fca868, byteCodeUpwardExposedUses=0x0000000907c16ba8, upwardExposedUses=0x0000000907c19b80, capturedValues=0x0000000907c19b50, insertionPoint=0x0000700006fc9a28) at LinearScan.cpp:5238:13 5235 if (lifetime->isSpilled) 5236 { 5237 #if DBG -> 5238 AssertMsg(!dstSym->IsConst(), "We don't need to restore constant symbol that has already been spilled"); 5239 // Supress assert in DbPostCheckLower 5240 dstSym->m_allocated = true; 5241 #endif Target 0: (ch) stopped. (lldb) bt * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00000001024e658c libChakraCore.dylib`LinearScan::GeneratorBailIn::InsertRestoreSymbols(this=0x0000700006fca868, byteCodeUpwardExposedUses=0x0000000907c16ba8, upwardExposedUses=0x0000000907c19b80, capturedValues=0x0000000907c19b50, insertionPoint=0x0000700006fc9a28) at LinearScan.cpp:5238:13 frame #1: 0x00000001024d5850 libChakraCore.dylib`LinearScan::GeneratorBailIn::GenerateBailIn(this=0x0000700006fca868, bailInInstr=0x0000000907c19a98) at LinearScan.cpp:5053:11 frame #2: 0x00000001024cc5c6 libChakraCore.dylib`LinearScan::RegAlloc(this=0x0000700006fca390) at LinearScan.cpp:293:38 frame #3: 0x000000010226cc0d libChakraCore.dylib`Func::TryCodegen(this=0x0000700006fcb150) at Func.cpp:501:20 frame #4: 0x000000010226bfef libChakraCore.dylib`Func::Codegen(alloc=0x0000700006fcb6e0, workItem=0x0000000907c01030, threadContextInfo=0x0000000101009c58, scriptContextInfo=0x000000010100b458, outputData=0x0000700006fcbb20, epInfo=0x0000000907c7b000, runtimeInfo=0x0000000000000000, polymorphicInlineCacheInfo=0x0000000907c76da0, codeGenAllocators=0x000000090800ee58, codeGenProfiler=0x0000000000000000, isBackgroundJIT=true) at Func.cpp:325:18 frame #5: 0x00000001025bd931 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100404a58, pageAllocator=0x0000000100405228, workItemData=0x00000001003108e0, jitWriteData=0x0000700006fcbb20, foreground=false, epInfo=0x0000000907c7b000) at NativeCodeGenerator.cpp:890:9 frame #6: 0x00000001025c00b8 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100404a58, pageAllocator=0x0000000100405228, workItem=0x00000001003108b8, foreground=false) at NativeCodeGenerator.cpp:1007:5 frame #7: 0x00000001025c37f4 libChakraCore.dylib`NativeCodeGenerator::Process(this=0x0000000100404a58, job=0x00000001003108c0, threadData=0x0000000100405208) at NativeCodeGenerator.cpp:1907:13 frame #8: 0x0000000102678541 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Process(this=0x0000000100404bc8, job=0x00000001003108c0, threadData=0x0000000100405208) at Jobs.cpp:1037:36 frame #9: 0x0000000102678b26 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Run(this=0x0000000100404bc8, threadData=0x0000000100405208) at Jobs.cpp:1135:44 frame #10: 0x0000000102676062 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::StaticThreadProc(lpParam=0x0000000100405208) at Jobs.cpp:1319:20 frame #11: 0x000000010209da83 libChakraCore.dylib`CorUnix::CPalThread::ThreadEntry(pvParam=0x000000010100ca00) at pal_thread.cpp:1605:16 frame #12: 0x00007fff20330950 libsystem_pthread.dylib`_pthread_start + 224 frame #13: 0x00007fff2032c47b libsystem_pthread.dylib`thread_start + 15 ``` It is reproducible both in `Relase` mode and `Debug` mode.
Assertion Error in `InsertRestoreSymbols`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6686/comments
3
2021-04-09T02:51:33Z
2021-04-18T14:58:14Z
https://github.com/chakra-core/ChakraCore/issues/6686
854,104,140
6,686
[ "chakra-core", "ChakraCore" ]
PoC: ``` function main() { do { function* v2(v3,v4,v5,...v6) { let v8 = 13.37; yield* -1728385604; const v13 = [1337,1337,1337,1337]; const v14 = [Object,13.37,v13,1,1,Object,v13,1,1337]; const v15 = v8++; } const v16 = v2(); } while (0 < 13.37); } main(); ``` Backtrace: ``` * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00000001024e6242 libChakraCore.dylib`LinearScan::GeneratorBailIn::BuildBailInSymbolList(this=0x0000700000d3a868, byteCodeUpwardExposedUses=0x000000090830ed20, upwardExposedUses=0x00000009081b7468, capturedValues=0x00000009081b7438) at LinearScan.cpp:5201:5 5198 } 5199 NEXT_BITSET_IN_SPARSEBV_EDITING; 5200 -> 5201 AssertOrFailFastMsg(unrestorableSymbols.IsEmpty(), "There are unrestorable backend-only symbols across yield points"); 5202 } 5203 5204 void LinearScan::GeneratorBailIn::InsertRestoreSymbols( Target 0: (ch) stopped. (lldb) bt * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00000001024e6242 libChakraCore.dylib`LinearScan::GeneratorBailIn::BuildBailInSymbolList(this=0x0000700000d3a868, byteCodeUpwardExposedUses=0x000000090830ed20, upwardExposedUses=0x00000009081b7468, capturedValues=0x00000009081b7438) at LinearScan.cpp:5201:5 frame #1: 0x00000001024d5823 libChakraCore.dylib`LinearScan::GeneratorBailIn::GenerateBailIn(this=0x0000700000d3a868, bailInInstr=0x00000009081b7380) at LinearScan.cpp:5047:11 frame #2: 0x00000001024cc5c6 libChakraCore.dylib`LinearScan::RegAlloc(this=0x0000700000d3a390) at LinearScan.cpp:293:38 frame #3: 0x000000010226cc0d libChakraCore.dylib`Func::TryCodegen(this=0x0000700000d3b150) at Func.cpp:501:20 frame #4: 0x000000010226bfef libChakraCore.dylib`Func::Codegen(alloc=0x0000700000d3b6e0, workItem=0x00000009081a1030, threadContextInfo=0x0000000907808258, scriptContextInfo=0x0000000101820058, outputData=0x0000700000d3bb20, epInfo=0x000000090812d120, runtimeInfo=0x0000000000000000, polymorphicInlineCacheInfo=0x00000009081809c0, codeGenAllocators=0x000000010100fc58, codeGenProfiler=0x0000000000000000, isBackgroundJIT=true) at Func.cpp:325:18 frame #5: 0x00000001025bd931 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100508c48, pageAllocator=0x0000000100509418, workItemData=0x000000010040cf50, jitWriteData=0x0000700000d3bb20, foreground=false, epInfo=0x000000090812d120) at NativeCodeGenerator.cpp:890:9 frame #6: 0x00000001025c00b8 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100508c48, pageAllocator=0x0000000100509418, workItem=0x000000010040cf28, foreground=false) at NativeCodeGenerator.cpp:1007:5 frame #7: 0x00000001025c37f4 libChakraCore.dylib`NativeCodeGenerator::Process(this=0x0000000100508c48, job=0x000000010040cf30, threadData=0x00000001005093f8) at NativeCodeGenerator.cpp:1907:13 frame #8: 0x0000000102678541 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Process(this=0x0000000100508db8, job=0x000000010040cf30, threadData=0x00000001005093f8) at Jobs.cpp:1037:36 frame #9: 0x0000000102678b26 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Run(this=0x0000000100508db8, threadData=0x00000001005093f8) at Jobs.cpp:1135:44 frame #10: 0x0000000102676062 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::StaticThreadProc(lpParam=0x00000001005093f8) at Jobs.cpp:1319:20 frame #11: 0x000000010209da83 libChakraCore.dylib`CorUnix::CPalThread::ThreadEntry(pvParam=0x0000000101821600) at pal_thread.cpp:1605:16 frame #12: 0x00007fff20330950 libsystem_pthread.dylib`_pthread_start + 224 frame #13: 0x00007fff2032c47b libsystem_pthread.dylib`thread_start + 15 ``` It is reproducible both in `Relase` mode and `Debug` mode.
Assertion Error in `BuildBailInSymbolList`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6685/comments
1
2021-04-09T02:47:22Z
2021-04-18T14:58:14Z
https://github.com/chakra-core/ChakraCore/issues/6685
854,102,669
6,685
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { do { function v2(v3,v4,v5,v6,v7) { const v15 = [13.37,13.37,13.37,13.37]; const v16 = v15[13.37]; const v17 = eval(1,..."ignoreCase",v16,..."pS1LFZI9uc",1); } const v19 = [13.37,13.37,13.37,13.37,13.37]; const v20 = v19.concat(); v19.valueOf = v2; } while (0 <= 255); } main(); ``` backtrace: ``` * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x000000010257ce19 libChakraCore.dylib`Lowerer::MapStFldHelper(this=0x000070000783ae88, propertySymOpnd=0x0000000907af4d98, helperMethod=0x0000700007839214, polymorphicHelperMethod=0x0000700007839210) at Lower.cpp:7221:17 7218 // an object that does. 7219 break; 7220 default: -> 7221 AssertOrFailFast(false); 7222 break; 7223 } 7224 } Target 0: (ch) stopped. (lldb) bt * thread #5, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x000000010257ce19 libChakraCore.dylib`Lowerer::MapStFldHelper(this=0x000070000783ae88, propertySymOpnd=0x0000000907af4d98, helperMethod=0x0000700007839214, polymorphicHelperMethod=0x0000700007839210) at Lower.cpp:7221:17 frame #1: 0x000000010253ccfc libChakraCore.dylib`Lowerer::LowerStFld(this=0x000070000783ae88, stFldInstr=0x0000000907afe6e0, helperMethod=HelperOp_InitConstFld, polymorphicHelperMethod=HelperOp_InitConstFld, withInlineCache=false, labelBailOut=0x0000000000000000, isHelper=false, withPutFlags=false, flags=PropertyOperation_None) at Lower.cpp:7101:13 frame #2: 0x000000010253a1d5 libChakraCore.dylib`Lowerer::LowerRange(this=0x000070000783ae88, instrStart=0x0000000907af2170, instrEnd=0x0000000907af21d0, defaultDoFastPath=true, defaultDoLoopFastPath=true) at Lower.cpp:2542:13 frame #3: 0x00000001025300b3 libChakraCore.dylib`Lowerer::Lower(this=0x000070000783ae88) at Lower.cpp:104:11 frame #4: 0x00000001022ac97e libChakraCore.dylib`Func::TryCodegen(this=0x000070000783b150) at Func.cpp:475:17 frame #5: 0x00000001022abfef libChakraCore.dylib`Func::Codegen(alloc=0x000070000783b6e0, workItem=0x0000000907ae1030, threadContextInfo=0x000000010080fc58, scriptContextInfo=0x0000000100817058, outputData=0x000070000783bb20, epInfo=0x00000009077f3200, runtimeInfo=0x0000000000000000, polymorphicInlineCacheInfo=0x0000000907aa6920, codeGenAllocators=0x0000000100819a58, codeGenProfiler=0x0000000000000000, isBackgroundJIT=true) at Func.cpp:325:18 frame #6: 0x00000001025fd931 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100308cc8, pageAllocator=0x0000000100309498, workItemData=0x0000000100607310, jitWriteData=0x000070000783bb20, foreground=false, epInfo=0x00000009077f3200) at NativeCodeGenerator.cpp:890:9 frame #7: 0x00000001026000b8 libChakraCore.dylib`NativeCodeGenerator::CodeGen(this=0x0000000100308cc8, pageAllocator=0x0000000100309498, workItem=0x00000001006072e8, foreground=false) at NativeCodeGenerator.cpp:1007:5 frame #8: 0x0000000102603777 libChakraCore.dylib`NativeCodeGenerator::Process(this=0x0000000100308cc8, job=0x00000001006072f0, threadData=0x0000000100309478) at NativeCodeGenerator.cpp:1895:13 frame #9: 0x00000001026b8541 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Process(this=0x0000000100308e38, job=0x00000001006072f0, threadData=0x0000000100309478) at Jobs.cpp:1037:36 frame #10: 0x00000001026b8b26 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::Run(this=0x0000000100308e38, threadData=0x0000000100309478) at Jobs.cpp:1135:44 frame #11: 0x00000001026b6062 libChakraCore.dylib`JsUtil::BackgroundJobProcessor::StaticThreadProc(lpParam=0x0000000100309478) at Jobs.cpp:1319:20 frame #12: 0x00000001020dda83 libChakraCore.dylib`CorUnix::CPalThread::ThreadEntry(pvParam=0x0000000100818600) at pal_thread.cpp:1605:16 frame #13: 0x00007fff20330950 libsystem_pthread.dylib`_pthread_start + 224 frame #14: 0x00007fff2032c47b libsystem_pthread.dylib`thread_start + 15 ``` It is reproducable both in `Release` and `Debug` mode.
AssertOrFailFast in `MapStFldHelper`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6683/comments
1
2021-04-08T17:46:40Z
2021-04-14T23:54:14Z
https://github.com/chakra-core/ChakraCore/issues/6683
853,705,538
6,683
[ "chakra-core", "ChakraCore" ]
PoC: ``` function main() { async function* v0(v1,v2,v3,v4,...v5) { const v6 = ` Object; `; const v9 = eval(v6); } const v10 = v0(); } main(); ``` backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x178) frame #0: 0x0000000101ffd61c libChakraCore.dylib`Js::FunctionBody::HasReferenceableBuiltInArguments(this=0x0000000000000000) const at FunctionBody.h:3266:64 3263 bool GetCallsEval() const { return m_CallsEval; } 3264 void SetCallsEval(bool set) { m_CallsEval = set; } 3265 -> 3266 bool HasReferenceableBuiltInArguments() const { return m_hasReferenceableBuiltInArguments; } 3267 void SetHasReferenceableBuiltInArguments(bool value) { m_hasReferenceableBuiltInArguments = value; } 3268 3269 bool IsParamAndBodyScopeMerged() const { return m_isParamAndBodyScopeMerged; } * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x178) * frame #0: 0x000000010293d61c libChakraCore.dylib`Js::FunctionBody::HasReferenceableBuiltInArguments(this=0x0000000000000000) const at FunctionBody.h:3266:64 frame #1: 0x0000000102fc2425 libChakraCore.dylib`Js::JavascriptOperators::FillScopeObject(funcCallee=0x0000000907b27680, actualsCount=0, formalsCount=5, frameObj=0x0000000907b24520, paramAddr=0x00000009078c5338, propIds=0x0000000907b242e0, argsObj=0x0000000907b88300, scriptContext=0x0000000908812258, nonSimpleParamList=true, useCachedScope=false) at JavascriptOperators.cpp:7502:58 frame #2: 0x0000000102fc201f libChakraCore.dylib`Js::JavascriptOperators::LoadHeapArguments(funcCallee=0x0000000907b27680, actualsCount=0, paramAddr=0x00000009078c5338, frameObj=0x0000000907b24520, vArray=0x0000000907b242e0, scriptContext=0x0000000908812258, nonSimpleParamList=true) at JavascriptOperators.cpp:7454:16 frame #3: 0x0000000102f50971 libChakraCore.dylib`void* Js::InterpreterStackFrame::LdHeapArgumentsImpl<true>(this=0x0000000907b31000, argsArray=0x0000000907b242e0, scriptContext=0x0000000908812258) at InterpreterStackFrame.cpp:9420:20 frame #4: 0x0000000102e175a9 libChakraCore.dylib`Js::InterpreterStackFrame::OP_LdLetHeapArguments(this=0x0000000907b31000, scriptContext=0x0000000908812258) at InterpreterStackFrame.cpp:9434:16 frame #5: 0x0000000102e41b06 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x0000000907b31000) at InterpreterHandler.inl:362:3 frame #6: 0x0000000102dd38f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x0000000907b31000) at InterpreterStackFrame.cpp:3472:20 frame #7: 0x0000000102dd23fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000009078c67d0, args=ArgumentReader @ 0x00007ffeefbfb440, returnAddress=0x0000000907b60f92, addressOfReturnAddress=0x00007ffeefbfb488, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #8: 0x0000000102dd1480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfb4a0) at InterpreterStackFrame.cpp:1833:16 frame #9: 0x0000000907b60f92 frame #10: 0x000000010354d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #11: 0x00000001032062db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000009078c67d0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfb598, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #12: 0x0000000103212a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000907b2f000, data=0x00000009078c5030, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #13: 0x00000001031cd2fc libChakraCore.dylib`Js::JavascriptAsyncGeneratorFunction::EntryAsyncGeneratorFunctionImplementation(function=0x0000000907b27680, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncGeneratorFunction.cpp:62:20 frame #14: 0x000000010354d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #15: 0x00000001032062db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000907b27680, entryPoint=(libChakraCore.dylib`Js::JavascriptAsyncGeneratorFunction::EntryAsyncGeneratorFunctionImplementation(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptAsyncGeneratorFunction.cpp:44), args=Arguments @ 0x00007ffeefbfb808, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #16: 0x0000000102f69e7a libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfca20, playout=0x000000090786ce89, function=0x0000000907b27680, flags=2, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3988:54 frame #17: 0x0000000102f69771 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfca20, playout=0x000000090786ce89, function=0x0000000907b27680, flags=0, profileId=0, inlineCacheIndex=4294967295, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #18: 0x0000000102e44b03 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallI<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfca20, playout=0x000000090786ce89)0> > > const __unaligned*) at InterpreterStackFrame.h:515:104 frame #19: 0x0000000102e3965e libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfca20) at InterpreterHandler.inl:87:3 ``` It is reproducable both in Release and Debug mode.
Invalid Memory Access in `HasReferenceableBuiltInArguments`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6682/comments
0
2021-04-08T17:35:27Z
2021-04-16T02:55:23Z
https://github.com/chakra-core/ChakraCore/issues/6682
853,697,624
6,682
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v0 = parseInt; const v2 = [13.37,13.37,13.37,13.37]; const v4 = [1337,1337,1337]; const v5 = [1337]; const v6 = {__proto__:1337,c:v4,constructor:v5,d:v4,e:v2}; const v10 = [13.37,13.37,13.37,13.37,13.37]; const v12 = [1337,1337,1337,1337,1337]; const v13 = [v12]; const v14 = {__proto__:1337,a:1337,b:v13,c:129,e:v10,length:13.37,toString:"undefined",valueOf:v12}; const v15 = {c:129,constructor:13.37,e:v12,valueOf:v10}; const v18 = [13.37,13.37,13.37,13.37,13.37]; const v20 = [-536870912]; const v21 = [13.37,Int16Array,13.37]; const v22 = {__proto__:v18,a:v21,b:-536870912}; const v24 = "kexCRFZqsO"; const v26 = [13.37]; const v28 = [1337,1337,1337,1337]; const v29 = [1337]; const v30 = {a:v29,e:v26,valueOf:2147483649}; let v34 = -1000.0; const v35 = [v34,"65537",v30,v34]; function v37(v38,v39) { } const v40 = (v41,v42) => { }; const v43 = [257]; const v44 = [Map,257,8,v35,257]; const v45 = {__proto__:v35,a:v35,c:v43,constructor:v43,d:v44,e:"65537",toString:v35,valueOf:"65537"}; const v46 = {b:257,d:v34,length:v43,valueOf:v45}; const v48 = [257]; const v49 = 3381155459; const v50 = "65537"; const v52 = [1337]; const v53 = Object; const v54 = String; const v59 = [1337]; const v60 = [String,3381155459,3381155459,v34,1337]; const v61 = RegExp; const v62 = Object; const v63 = String; const v64 = [-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308]; const v65 = 4294967297; v34 = 3381155459; const v66 = Object; const v71 = [13.37,13.37,13.37,13.37]; const v73 = [1337]; const v74 = [Map,1337,8,13.37,1337]; const v75 = {__proto__:v71,a:v71,c:v73,constructor:v73,d:v74,e:"65537",toString:v71,valueOf:"65537"}; const v76 = {b:13.37,d:13.37,length:v73,valueOf:v75}; let v78 = "65537"; let v79 = Map; let v80 = 13.37; const v81 = [v80,v78,v80,v80]; v79 = v79; const v88 = [1337]; const v89 = [String,1337,3381155459,-2.2250738585072014e-308,1337]; const v90 = Object; const v92 = 1; const v93 = (v94,v95) => { }; const v96 = [1337]; const v97 = [v79,1337,8,v81,1337]; const v98 = {__proto__:v81,a:v81,c:v96,constructor:v96,d:v97,e:v78,toString:v81,valueOf:v78}; const v99 = {b:1337,d:v80,length:v96,valueOf:v98}; const v103 = [1337]; const v104 = [String,1337,8,v80,1337]; const v106 = Object(); const v109 = 2 && Object; const v110 = 3381155459; const v112 = [1337]; const v115 = Object; const v116 = Object; const v117 = [0,2,1337]; v78 = 1337; const v120 = -2.2250738585072014e-308; const v122 = [1337]; const v123 = [String,3381155459,3381155459,v80,1337]; const v124 = [-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308]; v80 = 3381155459; const v126 = Object; const v127 = Object; const v128 = 3381155459; const v129 = "65537"; const v130 = 1337; const v131 = Object; const v132 = [1337]; const v133 = [String,1337,3381155459,-2.2250738585072014e-308,1337]; const v134 = {__proto__:v124,a:v124,c:v132,toString:v132,d:v133,e:"65537",toString:v124,valueOf:"65537"}; const v135 = {b:-2.2250738585072014e-308,d:-2.2250738585072014e-308,length:String,valueOf:v134}; const v137 = Object; const v138 = Object(); const v139 = Object(); const v140 = Object; const v141 = String; const v142 = RegExp; const v143 = 3381155459; const v144 = "65537"; const v145 = 0; const v146 = 5; const v147 = 1; const v148 = String; const v150 = "65537"; const v154 = [1337]; const v155 = [String,1337,3381155459,-2.2250738585072014e-308,1337]; const v156 = Object; const v157 = Object; const v158 = 1337; const v159 = 1; const v160 = "toString"; const v161 = Number; const v162 = 13.37; const v164 = [-9007199254740993,-9007199254740993,-9007199254740993,-9007199254740993]; const v169 = [13.37,13.37,13.37,13.37]; const v171 = [1337]; const v172 = [Map,1337,8,13.37,1337]; const v173 = {__proto__:v169,a:v169,c:v171,constructor:v171,d:v172,e:"65537",toString:v169,valueOf:"65537"}; const v174 = {b:13.37,d:13.37,length:v171,valueOf:v173}; let v176 = "65537"; const v179 = [13.37,v176,13.37,13.37]; const v186 = [-1024]; const v187 = [String,-1024,3381155459,-2.2250738585072014e-308,-1024]; const v188 = Object; const v190 = 1; const v191 = [1337]; const v192 = [Map,1337,8,v179,1337]; const v193 = {__proto__:v179,a:v179,c:v191,constructor:v191,d:v192,e:v176,toString:v179,valueOf:v176}; const v194 = {b:1337,d:13.37,length:v191,valueOf:v193}; const v195 = 3381155459; const v196 = String; const v197 = 1337; const v198 = [1337]; const v199 = Object; const v202 = 3381155459; const v203 = "65537"; const v205 = [1337]; const v208 = Object; const v209 = Object; const v210 = [1073741824,2,1337]; v176 = 1337; const v211 = 3381155459; const v212 = String; const v213 = -2.2250738585072014e-308; const v214 = 1337; const v215 = Object; const v216 = [-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308,-2.2250738585072014e-308]; const v218 = Object; const v219 = Object; const v220 = 3381155459; const v221 = "65537"; const v222 = 1337; const v223 = Object; const v224 = [1337]; const v225 = [String,1337,3381155459,-2.2250738585072014e-308,1337]; const v226 = {__proto__:v216,a:v216,c:v224,constructor:v224,d:v225,e:"65537",toString:v216,valueOf:"65537"}; const v227 = {b:-2.2250738585072014e-308,d:-2.2250738585072014e-308,length:String,valueOf:v226}; const v228 = -2; const v229 = "4096"; const v230 = Float64Array; const v232 = [1337]; const v233 = {}; const v234 = -2; const v235 = "object"; const v236 = Object; const v238 = [13.37]; const v243 = [13.37,13.37,13.37,13.37]; const v245 = [1337]; const v246 = [Map,v238,8,13.37,1337]; const v247 = {__proto__:v243,a:v243,c:v245,constructor:v245,d:v246,e:"65537",toString:v243,valueOf:"65537"}; const v248 = {b:1337,d:13.37,length:v245,valueOf:v247}; const v249 = String; const v250 = Int16Array; const v252 = [13.37]; const v254 = [2854028078,2854028078,2854028078]; const v255 = [13.37,2854028078,v254]; const v259 = [13.37,13.37,13.37,13.37]; const v261 = [Map,"matchAll",13.37,Map]; const v262 = {__proto__:13.37,a:v261,c:"matchAll",d:1337,b:Map,valueOf:Map}; const v267 = [13.37,13.37,13.37]; const v269 = [1337,1337,1337]; const v270 = [v267,v269,JSON,v269,JSON,1024,1337,JSON]; const v271 = {b:1337,c:v270,constructor:"object",d:v270,e:JSON,toString:v267,valueOf:v270}; const v272 = {a:v271,constructor:v267,toString:"object"}; const v273 = JSON; const v275 = "1073741824"; let v276 = 0; const v277 = 4; const v278 = v276++; const v281 = [13.37,13.37,13.37,13.37,13.37]; const v283 = [1337]; const v284 = [13.37,Int16Array,13.37]; const v285 = 1; const v286 = "arguments"; const v287 = Function; const v288 = 13.37; const v290 = {}; const v291 = 1; const v292 = "toString"; const v294 = [13.37,13.37,13.37,13.37,13.37]; const v296 = [1337,1337,1337,1337]; const v297 = {}; const v302 = [13.37,13.37,13.37,13.37,13.37]; const v304 = [1337,1337,1337,1337]; const v305 = [Function,13.37,v304,1,1,Function,v304,1,1337]; const v306 = {a:Function,b:1337,constructor:13.37,e:v305,length:13.37,toString:"toString",valueOf:13.37}; const v307 = {}; const v308 = 1; const v312 = [13.37,13.37,13.37,13.37,13.37]; const v317 = [13.37,13.37,13.37,13.37,13.37]; const v319 = "object"; const v321 = 8; const v322 = 0; const v323 = 1; const v324 = class V324 { constructor(v326,v327) { } getUint32(v329,v330,v331) { } entries(v333,...v334) { } }; const v335 = 1337; const v336 = Object.__proto__; const v337 = [1337,1337,1337,1337]; const v338 = [Function,13.37,v337,1,1,Function,v337,1,1337]; const v339 = Map; const v341 = [1337,1337,1337,1337]; const v344 = [-2.2250738585072014e-308,13.37,13.37,-2.2250738585072014e-308]; const v345 = [1337]; const v346 = {__proto__:v79,a:v294,c:v304,constructor:v345,d:v296,e:"toString",toString:v344,valueOf:"65537"}; const v347 = Object(); const v348 = {a:Function,b:1337,constructor:13.37,e:v338,length:13.37,toString:"toString",valueOf:13.37}; const v349 = {}; const v350 = Object; const v351 = Function(); const v352 = Object; const v355 = [1337,1337,13.37,1337]; const v356 = {a:Function,b:1337,constructor:13.37,e:Object,length:13.37,toString:"toString",valueOf:13.37}; const v357 = {}; async function v358(v359,v360,v361,v362) { } const v364 = Object(); const v365 = Object(); const v366 = {}; const v371 = [13.37,13.37,13.37,13.37,13.37]; const v374 = [1337,1337,13.37,1337]; const v375 = [Function,13.37,v374,1,1,Function,v374,1,v371]; const v376 = {a:Function,b:1337,constructor:13.37,e:Object,length:13.37,toString:"toString",valueOf:13.37}; const v377 = {}; const v379 = Object(); const v384 = [13.37,13.37,13.37,13.37,13.37]; const v387 = [1337,1337,1337,1337]; const v388 = [Function,13.37,v387,1,1,Function,v387,1,1337]; const v389 = {a:Function,b:1337,constructor:13.37,e:v388,length:13.37,toString:"toString",valueOf:13.37}; const v390 = {}; const v392 = Object(); const v393 = Object(); const v394 = Symbol; const v400 = [0]; const v402 = {apply:Object,defineProperty:Object,get:Object,getPrototypeOf:NaN,ownKeys:Array,setPrototypeOf:Object}; const v407 = [13.37,13.37,13.37,13.37,13.37]; const v410 = [1337,1337,1337,1337]; const v411 = [Function,13.37,v410,1,1,Function,v410,1,1337]; const v412 = {a:Function,b:1337,constructor:13.37,e:v411,length:13.37,toString:"toString",valueOf:13.37}; const v413 = {}; const v415 = Object(); const v416 = Object(); const v417 = {d:-536870912}; const v418 = {__proto__:v281,a:v284,b:1337}; const v423 = [13.37,13.37,13.37,13.37,13.37]; const v425 = [1337,1337,1337,1337]; const v427 = [1337,1337,1337]; const v428 = [v427,13.37,v427,3656152034,3656152034,"global",Uint8ClampedArray,v427,Uint8ClampedArray,v427]; const v429 = {__proto__:v423,c:v423,length:"global",valueOf:v428}; const v430 = []; const v431 = v430.some; const v432 = v425 in v417; const v433 = Uint8ClampedArray; const v435 = [13.37,13.37,13.37,13.37,13.37]; const v436 = "IJ8FcfXm6Z"; const v437 = eval; const v440 = Promise; const v443 = [13.37,13.37,13.37,13.37]; const v445 = [1337]; const v446 = [Map,1337,8,13.37,1337]; const v447 = {__proto__:v443,a:v443,c:v445,constructor:v445,d:v446,e:"65537",toString:v443,valueOf:"65537"}; const v451 = [13.37,13.37]; const v453 = [v451]; const v454 = {__proto__:1337,a:v453,c:4096,e:NaN,toString:v21}; const v456 = JSON.stringify(v454); const v458 = JSON.parse(v456,CollectGarbage); for (let v462 = 0; v462 < 4; v462++) { } const v464 = class V464 extends Object { constructor(v466,v467,v468) { } join(v470) { } }; CollectGarbage(); } main(); ``` backtrace: ``` * thread #4, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x0000000102797d04 libChakraCore.dylib`Memory::RecyclerObjectGraphDumper::BeginDumpObject(this=0x00007ffeefbf8a98, objectAddress=0x0000000908229000) at RecyclerObjectGraphDumper.cpp:45:5 42 void RecyclerObjectGraphDumper::BeginDumpObject(void * objectAddress) 43 { 44 Assert(dumpObjectName == nullptr); -> 45 Assert(dumpObject == nullptr); 46 this->dumpObject = objectAddress; 47 #ifdef PROFILE_RECYCLER_ALLOC 48 if (recycler->trackerDictionary) Target 0: (ch) stopped. (lldb) bt * thread #4, stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102797d04 libChakraCore.dylib`Memory::RecyclerObjectGraphDumper::BeginDumpObject(this=0x00007ffeefbf8a98, objectAddress=0x0000000908229000) at RecyclerObjectGraphDumper.cpp:45:5 frame #1: 0x0000000102789007 libChakraCore.dylib`void Memory::MarkContext::ScanObject<true, false>(this=0x0000700002b94d78, obj=0x0000000908229000, byteCount=96) at MarkContext.inl:149:5 frame #2: 0x0000000102788f00 libChakraCore.dylib`void Memory::MarkContext::ProcessMark<true, false>(this=0x0000700002b94d78) at MarkContext.inl:257:21 frame #3: 0x0000000102767966 libChakraCore.dylib`void Memory::Recycler::ProcessMarkContext<true, false>(this=0x00000001007a0058, markContext=0x00000001007a0158) at Recycler.cpp:2168:26 frame #4: 0x0000000102767774 libChakraCore.dylib`Memory::Recycler::ProcessParallelMark(this=0x00000001007a0058, background=false, markContext=0x00000001007a0158) at Recycler.cpp:2248:15 frame #5: 0x000000010276c9d7 libChakraCore.dylib`Memory::Recycler::DoBackgroundWork(this=0x00000001007a0058, forceForeground=false) at Recycler.cpp:6157:15 frame #6: 0x00000001027742eb libChakraCore.dylib`Memory::Recycler::ThreadProc(this=0x00000001007a0058) at Recycler.cpp:6470:9 frame #7: 0x00000001027722bf libChakraCore.dylib`Memory::Recycler::StaticThreadProc(lpParameter=0x00000001007a0058) at Recycler.cpp:6120:25 frame #8: 0x000000010209da83 libChakraCore.dylib`CorUnix::CPalThread::ThreadEntry(pvParam=0x000000090780e200) at pal_thread.cpp:1605:16 frame #9: 0x00007fff20330950 libsystem_pthread.dylib`_pthread_start + 224 frame #10: 0x00007fff2032c47b libsystem_pthread.dylib`thread_start + 15 ``` How to reproduce: ``` ./build.sh -d -j ./ch -collectGarbage poc.js ```
Assertion Error in `BeginDumpObject`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6681/comments
1
2021-04-08T17:24:18Z
2021-04-18T15:20:08Z
https://github.com/chakra-core/ChakraCore/issues/6681
853,689,140
6,681
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { const v1 = ` async function v2(v3,v4,v5,v6) { for (let v10 = 0; v10 < 1337; v10++) { const v11 = await 1337; } } const v12 = v2(); "w7tjpMAv1f"; `; const v15 = eval(v1); CollectGarbage(); } main(); ``` backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) frame #0: 0x00000009084602af -> 0x9084602af: movq 0x10(%r15), %rax 0x9084602b3: leaq (%rax), %rcx 0x9084602b6: movq %rbx, (%rax) 0x9084602b9: shrq $0xc, %rcx bt * frame #0: 0x00000009084602af frame #1: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #2: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x000000090825fd70, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe278, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #3: 0x00000001030d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000908249060, data=0x0001000000000539, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #4: 0x0000000103083904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x000000090840d5b0, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #5: 0x0000000103083ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x000000090840d5b0, generator=0x0000000908249060, resolve=0x00000009082405a0, reject=0x0000000908240600) at JavascriptAsyncFunction.cpp:151:25 frame #6: 0x0000000103084577 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x000000090840d4d0, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #7: 0x00000001032873e6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x000000090840f3c0, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #8: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #9: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x000000090840f3c0, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfea30, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #10: 0x00000001030c65ff libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x000000090840f3c0, args=Arguments @ 0x00007ffeefbfeaa0, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:772:24 frame #11: 0x00000001030c643c libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x000000090840f3c0, args=<unavailable>, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:717:15 frame #12: 0x00000001030c63e1 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x000000090840f3c0, args=<unavailable>, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:832:16 frame #13: 0x0000000102128525 libChakraCore.dylib`JsCallFunction::$_67::operator(this=0x00007ffeefbfef10, scriptContext=0x0000000908808258, _actionEntryPopper=0x00007ffeefbfeef0)(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const at Jsrt.cpp:2842:41 frame #14: 0x0000000102127eb4 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(this=0x00007ffeefbfeea8, scriptContext=0x0000000908808258)::'lambda'(Js::ScriptContext*)::operator()(Js::ScriptContext*) const at JsrtInternal.h:237:16 frame #15: 0x0000000102127884 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::'lambda'(Js::ScriptContext*)>(fn=(anonymous class) @ 0x00007ffeefbfeea8) at JsrtInternal.h:192:23 frame #16: 0x00000001020e3d46 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(fn=(anonymous class) @ 0x00007ffeefbfef10) at JsrtInternal.h:235:27 frame #17: 0x00000001020e3d09 libChakraCore.dylib`::JsCallFunction(function=0x000000090840f3c0, args=0x00007ffeefbfefe0, cargs=1, result=0x00007ffeefbfefd8) at Jsrt.cpp:2804:12 frame #18: 0x000000010000bdeb ch`ChakraRTInterface::JsCallFunction(function=0x000000090840f3c0, arguments=0x00007ffeefbfefe0, argumentCount=1, result=0x00007ffeefbfefd8) at ChakraRtInterface.h:416:149 frame #19: 0x000000010001b35a ch`WScriptJsrt::CallbackMessage::CallFunction(this=0x000000010030d590, fileName="./test_crashes.js") at WScriptJsrt.cpp:1988:21 frame #20: 0x000000010001b23d ch`WScriptJsrt::CallbackMessage::Call(this=0x000000010030d590, fileName="./test_crashes.js") at WScriptJsrt.cpp:1959:12 frame #21: 0x000000010000543e ch`MessageQueue::ProcessAll(this=0x00000009083040b0, fileName="./test_crashes.js") at MessageQueue.h:256:18 frame #22: 0x0000000100004ba0 ch`RunScript(fileName="./test_crashes.js", fileContents="function main() {\n const v1 = `\n async function v2(v3,v4,v5,v6) {\n for (let v10 = 0; v10 < 1337; v10++) {\n const v11 = await 1337;\n }\n }\n const v12 = v2();\n \"w7tjpMAv1f\";\n `;\n const v15 = eval(v1);\n CollectGarbage();\n}\nmain();\n", fileLength=474, fileContentsFinalizeCallback=(ch`WScriptJsrt::FinalizeFree(void*) at WScriptJsrt.cpp:208), bufferValue=0x0000000000000000, fullPath="/Users/cpang/Desktop/graduate/javascript/ChakraCore/test_crashes.js", parserStateCache=0x0000000000000000)(void*), void*, char*, void*) at ch.cpp:480:17 frame #23: 0x0000000100006f9e ch`ExecuteTest(fileName="./test_crashes.js") at ch.cpp:917:13 frame #24: 0x000000010000734c ch`ExecuteTestWithMemoryCheck(fileName="./test_crashes.js") at ch.cpp:967:10 frame #25: 0x0000000100007c89 ch`main(argc=3, c_argv=0x00007ffeefbff6f8) at ch.cpp:1274:20 frame #26: 0x00007fff2034b621 libdyld.dylib`start + 1 frame #27: 0x00007fff2034b621 libdyld.dylib`start + 1 ``` How to reproduce: ``` - ./build.sh -d -j - ./ch -collectGarbage ```
Segmentation Fault in `amd64_CallFunction`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6679/comments
3
2021-04-07T10:51:57Z
2021-04-18T14:58:13Z
https://github.com/chakra-core/ChakraCore/issues/6679
852,281,222
6,679
[ "chakra-core", "ChakraCore" ]
PoC: ```javascript function main() { async function v0(v1,v2,v3,v4) { for (let v8 = 0; v8 < 1337; v8++) { const v9 = class V9 { constructor(v11,v12,v13) { const v14 = !v8; } isView(v16,...v17) { } atan(v19) { } isFinite(v21,v22,v23) { } }; const v24 = await v2; } } const v25 = v0(); CollectGarbage(); } main(); ``` backtrace: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00000001032d02dd libChakraCore.dylib`Js::ScopeSlots::GetCount(this=0x00007ffeefbfe058) const at FunctionBody.h:3513:66 frame #1: 0x0000000103683263 libChakraCore.dylib`Js::JavascriptOperators::OP_CloneScopeSlots(slotArray=0x0000000000000000, scriptContext=0x0000000908808258) at JavascriptOperators.cpp:7681:74 frame #2: 0x000000090832044d frame #3: 0x0000000103c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #4: 0x00000001038c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001007e67d0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe238, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #5: 0x00000001038d2a47 libChakraCore.dylib`Js::JavascriptGenerator::CallGenerator(this=0x0000000908249060, data=0x00000001007e5030, resumeKind=Normal) at JavascriptGenerator.cpp:185:26 frame #6: 0x0000000103883904 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnStepNextFunction(function=0x00000009082d2850, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:93:31 frame #7: 0x0000000103883ae8 libChakraCore.dylib`Js::JavascriptAsyncFunction::AsyncSpawnStep(stepFunction=0x00000009082d2850, generator=0x0000000908249060, resolve=0x00000009082402a0, reject=0x0000000908240300) at JavascriptAsyncFunction.cpp:151:25 frame #8: 0x0000000103884577 libChakraCore.dylib`Js::JavascriptAsyncFunction::EntryAsyncSpawnCallStepFunction(function=0x00000009082d2770, callInfo=(Count = 2, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncFunction.cpp:130:5 frame #9: 0x0000000103a873e6 libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(function=0x00000009082d70a0, callInfo=(Count = 1, Flags = CallFlags_None, unused = 0)) at JavascriptPromise.cpp:1074:37 frame #10: 0x0000000103c0d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #11: 0x00000001038c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000009082d70a0, entryPoint=(libChakraCore.dylib`Js::JavascriptPromise::EntryReactionTaskFunction(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptPromise.cpp:1037), args=Arguments @ 0x00007ffeefbfe9f0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #12: 0x00000001038c65ff libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x00000009082d70a0, args=Arguments @ 0x00007ffeefbfea60, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:772:24 frame #13: 0x00000001038c643c libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x00000009082d70a0, args=<unavailable>, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:717:15 frame #14: 0x00000001038c63e1 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x00000009082d70a0, args=<unavailable>, scriptContext=0x0000000908808258, inScript=true) at JavascriptFunction.cpp:832:16 frame #15: 0x0000000102928525 libChakraCore.dylib`JsCallFunction::$_67::operator(this=0x00007ffeefbfeed0, scriptContext=0x0000000908808258, _actionEntryPopper=0x00007ffeefbfeeb0)(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const at Jsrt.cpp:2842:41 frame #16: 0x0000000102927eb4 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(this=0x00007ffeefbfee68, scriptContext=0x0000000908808258)::'lambda'(Js::ScriptContext*)::operator()(Js::ScriptContext*) const at JsrtInternal.h:237:16 frame #17: 0x0000000102927884 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(JsCallFunction::$_67)::'lambda'(Js::ScriptContext*)>(fn=(anonymous class) @ 0x00007ffeefbfee68) at JsrtInternal.h:192:23 frame #18: 0x00000001028e3d46 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, JsCallFunction::$_67>(fn=(anonymous class) @ 0x00007ffeefbfeed0) at JsrtInternal.h:235:27 frame #19: 0x00000001028e3d09 libChakraCore.dylib`::JsCallFunction(function=0x00000009082d70a0, args=0x00007ffeefbfefa0, cargs=1, result=0x00007ffeefbfef98) at Jsrt.cpp:2804:12 frame #20: 0x000000010000bdeb ch`ChakraRTInterface::JsCallFunction(function=0x00000009082d70a0, arguments=0x00007ffeefbfefa0, argumentCount=1, result=0x00007ffeefbfef98) at ChakraRtInterface.h:416:149 frame #21: 0x000000010001b35a ch`WScriptJsrt::CallbackMessage::CallFunction(this=0x0000000100307b70, fileName="/Users/cpang/Desktop/graduate/javascript/JS_Fuzzing/chakracore/crash2/Poc.js") at WScriptJsrt.cpp:1988:21 frame #22: 0x000000010001b23d ch`WScriptJsrt::CallbackMessage::Call(this=0x0000000100307b70, fileName="/Users/cpang/Desktop/graduate/javascript/JS_Fuzzing/chakracore/crash2/Poc.js") at WScriptJsrt.cpp:1959:12 frame #23: 0x000000010000543e ch`MessageQueue::ProcessAll(this=0x000000010770ae80, fileName="/Users/cpang/Desktop/graduate/javascript/JS_Fuzzing/chakracore/crash2/Poc.js") at MessageQueue.h:256:18 ``` How to reproduce: ``` - ./build.sh -d -j - ch -collectGarbage ./poc.js ``` The error code: ```c++ * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00000001042d02dd libChakraCore.dylib`Js::ScopeSlots::GetCount(this=0x00007ffeefbfe058) const at FunctionBody.h:3513:66 3510 3511 size_t GetCount() const 3512 { -> 3513 return ::Math::PointerCastToIntegralTruncate<size_t>(slotArray[EncodedSlotCountSlotIndex]); 3514 } 3515 3516 void SetCount(uint count) ```
Segmentation Fault in `Js::ScopeSlots::GetCount`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6678/comments
6
2021-04-07T07:14:28Z
2021-04-18T14:58:13Z
https://github.com/chakra-core/ChakraCore/issues/6678
852,091,324
6,678
[ "chakra-core", "ChakraCore" ]
PoC: ```c++ function main() { async function* v1(v2,v3,v4) { } for (let v7 = 0; v7 < 1337; v7++) { v1.prototype = v7; } const v8 = v1(); } main(); ``` Backtrace: ``` (lldb) bt 30 * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x0000000102121995 libChakraCore.dylib`Js::DynamicObject* Js::VarTo<Js::DynamicObject>(aValue=0x0001000000000538) at RecyclableObject.h:527:9 frame #1: 0x000000010308d24d libChakraCore.dylib`Js::JavascriptAsyncGeneratorFunction::EntryAsyncGeneratorFunctionImplementation(function=0x0000000907a47640, callInfo=(Count = 1, Flags = CallFlags_Value, unused = 0)) at JavascriptAsyncGeneratorFunction.cpp:53:23 frame #2: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #3: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x0000000907a47640, entryPoint=(libChakraCore.dylib`Js::JavascriptAsyncGeneratorFunction::EntryAsyncGeneratorFunctionImplementation(Js::RecyclableObject*, Js::CallInfo, ...) at JavascriptAsyncGeneratorFunction.cpp:44), args=Arguments @ 0x00007ffeefbfb6d8, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #4: 0x0000000102e29e7a libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfc8f0, playout=0x000000010078d489, function=0x0000000907a47640, flags=2, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3988:54 frame #5: 0x0000000102e29771 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfc8f0, playout=0x000000010078d489, function=0x0000000907a47640, flags=0, profileId=0, inlineCacheIndex=4294967295, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #6: 0x0000000102d04b03 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallI<Js::OpLayoutT_CallI<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfc8f0, playout=0x000000010078d489)0> > > const __unaligned*) at InterpreterStackFrame.h:515:104 frame #7: 0x0000000102cf965e libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfc8f0) at InterpreterHandler.inl:87:3 frame #8: 0x0000000102c938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfc8f0) at InterpreterStackFrame.cpp:3472:20 frame #9: 0x0000000102c923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001007e6730, args=ArgumentReader @ 0x00007ffeefbfce20, returnAddress=0x0000000907a80f9a, addressOfReturnAddress=0x00007ffeefbfce68, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #10: 0x0000000102c91480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfce80) at InterpreterStackFrame.cpp:1833:16 frame #11: 0x0000000907a80f9a frame #12: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #13: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001007e6730, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfcfb0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #14: 0x0000000102e2be7f libChakraCore.dylib`void Js::InterpreterStackFrame::OP_CallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe180, playout=0x000000010078ce00, function=0x00000001007e6730, flags=16, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:3973:21 frame #15: 0x0000000102e2b971 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfileCallCommon<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(this=0x00007ffeefbfe180, playout=0x000000010078ce00, function=0x00000001007e6730, flags=0, profileId=0, inlineCacheIndex=0, spreadIndices=0x0000000000000000)0> > > __unaligned const __unaligned*, Js::RecyclableObject*, unsigned int, unsigned short, unsigned int, Js::AuxArray<unsigned int> const*) at InterpreterStackFrame.cpp:4016:9 frame #16: 0x0000000102d04dd8 libChakraCore.dylib`void Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(this=0x00007ffeefbfe180, playout=0x000000010078ce00)0> > > const __unaligned*) at InterpreterStackFrame.h:520:115 frame #17: 0x0000000102cf98f6 libChakraCore.dylib`Js::InterpreterStackFrame::ProcessProfiled(this=0x00007ffeefbfe180) at InterpreterHandler.inl:91:3 frame #18: 0x0000000102c938f4 libChakraCore.dylib`Js::InterpreterStackFrame::Process(this=0x00007ffeefbfe180) at InterpreterStackFrame.cpp:3472:20 frame #19: 0x0000000102c923fc libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterHelper(function=0x00000001007e66e0, args=ArgumentReader @ 0x00007ffeefbfe670, returnAddress=0x0000000907a80fa2, addressOfReturnAddress=0x00007ffeefbfe6b8, asmJsReturn=0x0000000000000000) at InterpreterStackFrame.cpp:2153:40 frame #20: 0x0000000102c91480 libChakraCore.dylib`Js::InterpreterStackFrame::InterpreterThunk(layout=0x00007ffeefbfe6d0) at InterpreterStackFrame.cpp:1833:16 frame #21: 0x0000000907a80fa2 frame #22: 0x000000010340d15e libChakraCore.dylib`amd64_CallFunction at JavascriptFunctionA.S:100 frame #23: 0x00000001030c62db libChakraCore.dylib`void* Js::JavascriptFunction::CallFunction<true>(function=0x00000001007e66e0, entryPoint=(libChakraCore.dylib`NativeCodeGenerator::CheckCodeGenThunk(Js::RecyclableObject*, Js::CallInfo, ...)), args=Arguments @ 0x00007ffeefbfe8e0, useLargeArgCount=false)(Js::RecyclableObject*, Js::CallInfo, ...), Js::Arguments, bool) at JavascriptFunction.cpp:1364:16 frame #24: 0x00000001030c65ff libChakraCore.dylib`Js::JavascriptFunction::CallRootFunctionInternal(obj=0x00000001007e66e0, args=Arguments @ 0x00007ffeefbfe950, scriptContext=0x0000000100811258, inScript=true) at JavascriptFunction.cpp:772:24 frame #25: 0x00000001030c643c libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(obj=0x00000001007e66e0, args=<unavailable>, scriptContext=0x0000000100811258, inScript=true) at JavascriptFunction.cpp:717:15 frame #26: 0x00000001030c63e1 libChakraCore.dylib`Js::JavascriptFunction::CallRootFunction(this=0x00000001007e66e0, args=<unavailable>, scriptContext=0x0000000100811258, inScript=true) at JavascriptFunction.cpp:832:16 frame #27: 0x000000010213380f libChakraCore.dylib`RunScriptCore(this=0x00007ffeefbfed20, scriptContext=0x0000000100811258, _actionEntryPopper=0x00007ffeefbfed00)::$_85::operator()(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const at Jsrt.cpp:3705:49 frame #28: 0x00000001021333b4 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_85>(this=0x00007ffeefbfecb8, scriptContext=0x0000000100811258)::$_85)::'lambda'(Js::ScriptContext*)::operator()(Js::ScriptContext*) const at JsrtInternal.h:237:16 frame #29: 0x0000000102132d84 libChakraCore.dylib`_JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_85>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_85)::'lambda'(Js::ScriptContext*)>(fn=(anonymous class) @ 0x00007ffeefbfecb8)::$_85) at JsrtInternal.h:192:23 ``` The source code is ```c++ // Cast the input parameter to another type, or crash if the cast is invalid. template <typename T> T* VarTo(Var aValue) { AssertOrFailFast(VarIs<T>(aValue)); return reinterpret_cast<T*>(aValue); } ```
AssertOrFailFast in `Js::VarTo`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6677/comments
4
2021-04-07T03:54:19Z
2021-04-10T15:55:44Z
https://github.com/chakra-core/ChakraCore/issues/6677
851,978,964
6,677
[ "chakra-core", "ChakraCore" ]
poc: ```c function main() { for (let v3 = -2; v3 < 1337; v3 = v3 + 0) { const v4 = v3++; } } main(); ``` backtrace is: ``` (gdb) bt #0 0x000055cd2ac3320a in GlobOpt::CollectMemOpInfo (this=0x7fb322aeefd0, instrBegin=<optimized out>, instr=<optimized out>, src1Val=0x7fb324fbd270, src2Val=<optimized out>) at /src/chakracore/lib/Backend/GlobOpt.cpp:2360 #1 0x000055cd2abf1ea0 in GlobOpt::OptInstr (this=0x7fb322aeefd0, instr=<optimized out>, isInstrRemoved=0x7fb322aedd20) at /src/chakracore/lib/Backend/GlobOpt.cpp:2739 #2 0x000055cd2abe17a7 in GlobOpt::OptBlock (this=<optimized out>, block=0x7fb324fb3508) at /src/chakracore/lib/Backend/GlobOpt.cpp:520 #3 0x000055cd2abdbcd7 in GlobOpt::ForwardPass (this=0x7fb322aeefd0) at /src/chakracore/lib/Backend/GlobOpt.cpp:401 #4 0x000055cd2abd8637 in GlobOpt::Optimize (this=<optimized out>) at /src/chakracore/lib/Backend/GlobOpt.cpp:211 #5 0x000055cd2ab831c7 in Func::TryCodegen (this=<optimized out>) at /src/chakracore/lib/Backend/Func.cpp:457 #6 0x000055cd2ab819f8 in Func::Codegen (alloc=0x7fb322af04a0, workItem=0x7fb324fa1030, threadContextInfo=0x623000000198, scriptContextInfo=0x622000000158, outputData=0x7fb322af0740, epInfo=0x7fb325165180, runtimeInfo=<optimized out>, polymorphicInlineCacheInfo=<optimized out>, codeGenAllocators=<optimized out>, codeGenProfiler=<optimized out>, isBackgroundJIT=<optimized out>) at /src/chakracore/lib/Backend/Func.cpp:325 #7 0x000055cd2a62990f in NativeCodeGenerator::CodeGen (this=<optimized out>, pageAllocator=<optimized out>, workItemData=0x612000000540, jitWriteData=..., foreground=false, epInfo=0x7fb325165180) at /src/chakracore/lib/Backend/NativeCodeGenerator.cpp:890 #8 0x000055cd2a62eaf8 in NativeCodeGenerator::CodeGen (this=0x6130000005d8, pageAllocator=<optimized out>, workItem=<optimized out>, foreground=64) at /src/chakracore/lib/Backend/NativeCodeGenerator.cpp:1007 #9 0x000055cd2a637e80 in NativeCodeGenerator::Process (this=<optimized out>, job=<optimized out>, threadData=0x615000002658) at /src/chakracore/lib/Backend/NativeCodeGenerator.cpp:1907 #10 0x000055cd2a77bad4 in JsUtil::BackgroundJobProcessor::Process (this=<optimized out>, job=<optimized out>, threadData=0x615000002658) at /src/chakracore/lib/Common/Common/Jobs.cpp:1037 #11 0x000055cd2a77c2ad in JsUtil::BackgroundJobProcessor::Run (this=0x612000000098, threadData=<optimized out>) at /src/chakracore/lib/Common/Common/Jobs.cpp:1135 #12 0x000055cd2a7740d0 in JsUtil::BackgroundJobProcessor::StaticThreadProc (lpParam=<optimized out>) at /src/chakracore/lib/Common/Common/Jobs.cpp:1319 #13 0x000055cd26fc3adb in CorUnix::CPalThread::ThreadEntry (pvParam=0x61c000001880) at /src/chakracore/pal/src/thread/pal_thread.cpp:1605 #14 0x000055cd26e2df3f in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) () #15 0x00007fb32a3986db in start_thread (arg=0x7fb322af1700) at pthread_create.c:463 #16 0x00007fb32990771f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ``` The source code of the assertion is: ```c++ // If an instr where the dst is an induction variable (and thus is being written to) is not caught by a case in the above // switch statement (which implies that this instr does not contributes to a inductionVariableChangeInfo) and in the default // case does not set doMemOp to false (which implies that this instr does not invalidate this MemOp), then FailFast as we // should not be performing a MemOp under these conditions. AssertOrFailFast(!instr->GetDst() || instr->m_opcode == Js::OpCode::IncrLoopBodyCount || !loop->memOpInfo || // Refer to "Case #2" described above in this function. For the following IR: // Line #1: s4(s2) = Add_I4 s3(s1) 1 // Line #2: s3(s1) = Ld_A s4(s2) // do not consider line #2 as a violating instr (instr->m_opcode == Js::OpCode::Ld_I4 && prevInstr && (prevInstr->m_opcode == Js::OpCode::Add_I4 || prevInstr->m_opcode == Js::OpCode::Sub_I4) && instr->GetSrc1()->IsRegOpnd() && instr->GetDst()->IsRegOpnd() && prevInstr->GetDst()->IsRegOpnd() && instr->GetDst()->GetStackSym() == prevInstr->GetSrc1()->GetStackSym() && instr->GetSrc1()->GetStackSym() == prevInstr->GetDst()->GetStackSym()) || !loop->memOpInfo->inductionVariableChangeInfoMap->ContainsKey(GetVarSymID(instr->GetDst()->GetStackSym()))); ```
Crash due to Assertion in `GlobalOpt::CollectMemOpInfo`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6676/comments
1
2021-04-06T15:06:05Z
2021-04-06T18:20:25Z
https://github.com/chakra-core/ChakraCore/issues/6676
851,521,931
6,676
[ "chakra-core", "ChakraCore" ]
* Source ```cxx JsPointerToString(NULL, 0, &str); ``` * Expected str = empty string * Actual failed and returns JsErrorNullArgument I think this should be possible
error when JsPointerToString with null 0
https://api.github.com/repos/chakra-core/ChakraCore/issues/6669/comments
7
2021-03-29T09:06:26Z
2024-05-13T13:54:08Z
https://github.com/chakra-core/ChakraCore/issues/6669
843,152,967
6,669
[ "chakra-core", "ChakraCore" ]
# Cannot finish web-tooling-benchmark test I'm trying to run [web-tooling-benchmark](https://github.com/v8/web-tooling-benchmark) on ChakraCore (version in master branch) but it seems that it just stuck at coffeescript test and cannot finish the entire test: ```bash ch cli.js ``` Output (stuck at coffeescript test and not able to get the test result): ```log Running Web Tooling Benchmark v0.5.3… ------------------------------------- acorn: 3.75 runs/s babel: 4.08 runs/s babel-minify: 3.21 runs/s babylon: 4.83 runs/s buble: 4.59 runs/s chai: 3.69 runs/s (stuck here) ``` While using v8 with node 14: ```log Running Web Tooling Benchmark v0.5.3… ------------------------------------- acorn: 10.86 runs/s babel: 8.31 runs/s babel-minify: 9.93 runs/s babylon: 7.41 runs/s buble: 4.44 runs/s chai: 10.38 runs/s coffeescript: 5.96 runs/s espree: 2.80 runs/s esprima: 6.93 runs/s jshint: 9.53 runs/s lebab: 9.56 runs/s postcss: 5.27 runs/s prepack: 5.56 runs/s prettier: 3.53 runs/s source-map: 4.80 runs/s terser: 13.26 runs/s typescript: 7.67 runs/s uglify-js: 4.07 runs/s ------------------------------------- Geometric mean: 6.66 runs/s ``` Prebuilt test suite: [dist.zip](https://github.com/chakra-core/ChakraCore/files/6215517/dist.zip) Also I think this can be added into ChakraCore benchmark test #6431
Cannot finish web-tooling-benchmark test
https://api.github.com/repos/chakra-core/ChakraCore/issues/6667/comments
1
2021-03-27T10:51:29Z
2021-03-27T16:39:22Z
https://github.com/chakra-core/ChakraCore/issues/6667
842,477,495
6,667
[ "chakra-core", "ChakraCore" ]
After viewing of Import assertions proposal, i questioned myself - how will the proposal be supported by JSRT of CC - by adding a separate callbacks with assertions object and keeping or deprecating the old callbacks, or change them to include the assertions object?
Support of import assertions proposal
https://api.github.com/repos/chakra-core/ChakraCore/issues/6666/comments
3
2021-03-26T18:00:23Z
2021-03-27T10:37:33Z
https://github.com/chakra-core/ChakraCore/issues/6666
842,188,803
6,666
[ "chakra-core", "ChakraCore" ]
https://github.com/chakra-core/ChakraCore/pull/6653 has implemented these methods behind a default off flag: ESArrayFindFromLast When the proposal reaches stage 3 we should enable the flag, also at that time the two unscopables tests (one with this feature and one without) should be combined, see: https://github.com/chakra-core/ChakraCore/blob/c091b36a2dbd85c568871b8fe49c4f180bab80cc/test/es6/rlexe.xml#L98-L107
Enable findLast and findLastIndex when they reach stage 3
https://api.github.com/repos/chakra-core/ChakraCore/issues/6661/comments
2
2021-03-22T10:04:05Z
2021-12-19T13:49:45Z
https://github.com/chakra-core/ChakraCore/issues/6661
837,551,464
6,661
[ "chakra-core", "ChakraCore" ]
https://github.com/tc39/proposal-logical-assignment
Support logical assignment
https://api.github.com/repos/chakra-core/ChakraCore/issues/6658/comments
2
2021-03-18T04:32:38Z
2021-03-18T17:09:57Z
https://github.com/chakra-core/ChakraCore/issues/6658
834,380,876
6,658
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` var v0 = ({method : (function* ([{v1}] = []){})}); var v2 = ({deflater : [], inflater : []}); function v3(){ v2.__proto__ = new Proxy(({}), v0); } v2 = new v3(v0[0], v2); v1 = 0; do { v1++; v3(); }while(v1<100000) ``` #asan output ``` ================================================================= ==8686==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x55ae22f9c3e8 (/root/targets/targets/ch_asan18+0x3e73e8) #1 0x55ae233d568f (/root/targets/targets/ch_asan18+0x82068f) #2 0x55ae254af98f (/root/targets/targets/ch_asan18+0x28fa98f) #3 0x55ae254b2ff5 (/root/targets/targets/ch_asan18+0x28fdff5) #4 0x55ae2551ffa3 (/root/targets/targets/ch_asan18+0x296afa3) #5 0x55ae2552092c (/root/targets/targets/ch_asan18+0x296b92c) #6 0x55ae25519d4c (/root/targets/targets/ch_asan18+0x2964d4c) #7 0x55ae23183027 (/root/targets/targets/ch_asan18+0x5ce027) #8 0x7f7da41976da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da) Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x55ae22f9c3e8 (/root/targets/targets/ch_asan18+0x3e73e8) #1 0x55ae233d568f (/root/targets/targets/ch_asan18+0x82068f) #2 0x55ae254af98f (/root/targets/targets/ch_asan18+0x28fa98f) #3 0x55ae254b2faf (/root/targets/targets/ch_asan18+0x28fdfaf) #4 0x55ae2551ffa3 (/root/targets/targets/ch_asan18+0x296afa3) #5 0x55ae2552092c (/root/targets/targets/ch_asan18+0x296b92c) #6 0x55ae25519d4c (/root/targets/targets/ch_asan18+0x2964d4c) #7 0x55ae23183027 (/root/targets/targets/ch_asan18+0x5ce027) #8 0x7f7da41976da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da) SUMMARY: AddressSanitizer: 16 byte(s) leaked in 2 allocation(s). ```
memory leak2
https://api.github.com/repos/chakra-core/ChakraCore/issues/6654/comments
0
2021-03-17T06:42:06Z
2021-03-17T06:42:06Z
https://github.com/chakra-core/ChakraCore/issues/6654
833,454,537
6,654
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 16 # poc ``` X1 = -2; var SEQH = new RegExp(null); Y1 = -2; X2 = 2; Y2 = 2; PX = 32; PY = 32; var Yeki = Date; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var btpP = Error; } lines = []; var epAW = new ArrayBuffer(673720360); var Hthx = -1.7976931348623157e+308 == 4294967295; for (y = 0; y < PY; y++) { line = ''; var NNZk = Proxy; var fEDk = 2147483647 < 1518500249; var jxbb = 3037000498 ^ 673720360; var Hjen = Proxy; for (x = 0; x < PX; x++) { Xr = 0; Xi = 0; var GmEH = Promise; Cr = X1 + (X2 - X1) * x / PX; var hkmy = Proxy; var bPNm = -9007199254740994 >>> 759250124; var Batd = NaN ^ 1; var zPSQ = 1 ** 1.7976931348623157e+308; Ci = Y1 + (Y2 - Y1) * y / PY; var tJQK = 4294967296 | 2147483648; var cntB = Proxy; iterations = 0; var mrDR = 1200 + 3.141592653589793; while (iterations < 32 && Xr * Xr + Xi * Xi < 4) { t = Xr * Xr - Xi * Xi + Cr; var jeFG = !1e-81; var YcQk = 1073741822 * -9007199254740990; var JReX = Proxy; var GZsz = Date; Xi = 2 * Xr * Xi + Ci; var GcDm = NaN > -9007199254740991; Xr = t; var ehrc = Date; iterations++; var iSCN = new Int16Array([ 1200, 759250124, 0 ]); var CSEp = !NaN; } if (iterations & 1) line += '*'; else line += ' '; } lines[y] = line; } result = lines[0] == '********************************' && lines[1] == '*********** **********' && lines[2] == '********* ********' && lines[3] == '******* ******' && lines[4] == '****** *****' && lines[5] == '***** ****' && lines[6] == '**** ******* ***' && lines[7] == '*** ******* ** ** **' && lines[8] == '*** ****** * * * **' && lines[9] == '** ******* ** ** ** *' && lines[10] == '** ****** * * ** ** *' && lines[11] == '* ***** *** ** ** ' && lines[12] == '****** *** ***** ' && lines[13] == '*** * * * ** ** ' && lines[14] == '* * * * * ** ' && lines[15] == '* *** ** ** ' && lines[16] == '* ** ** ' && lines[17] == '* *** ** ** ' && lines[18] == '* * * * * ** ' && lines[19] == '*** * * * ** ** ' && lines[20] == '****** *** ***** ' && lines[21] == '* ***** *** ** ** ' && lines[22] == '** ****** * * ** ** *' && lines[23] == '** ******* ** ** ** *' && lines[24] == '*** ****** * * * **' && lines[25] == '*** ******* ** ** **' && lines[26] == '**** ******* ***' && lines[27] == '***** ****' && lines[28] == '****** *****' && lines[29] == '******* ******' && lines[30] == '********* ********' && lines[31] == '*********** **********'; var HrHy = Math; ``` # asan output ``` ==52606==ERROR: LeakSanitizer: detected memory leaks Direct leak of 24 byte(s) in 3 object(s) allocated from: #0 0x562fd5af0948 in __interceptor_malloc (/root/AFL/tt/chnew/ch2+0x38f948) #1 0x562fd5d8e59b in char* Memory::HeapAllocator::AllocT<false>(unsigned long) /root/AFL/compile/ChakraCore/lib/Common/Memory/HeapAllocator.cpp:86:30 #2 0x562fd6ff0e8d in Memory::HeapAllocator::Alloc(unsigned long) /root/AFL/compile/ChakraCore/lib/Common/Memory/HeapAllocator.h:153:16 #3 0x562fd6ff0e8d in Memory::HeapAllocator::AllocZero(unsigned long) /root/AFL/compile/ChakraCore/lib/Common/Memory/HeapAllocator.h:171 #4 0x562fd6ff0e8d in void* operator new<Memory::HeapAllocator>(unsigned long, Memory::HeapAllocator*, char* (Memory::HeapAllocator::*)(unsigned long)) /root/AFL/compile/ChakraCore/lib/Common/DataStructures/../Memory/Allocator.h:486 #5 0x562fd6ff0e8d in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase<Memory::VirtualAllocWrapper, Memory::SegmentBase<Memory::VirtualAllocWrapper>, Memory::PageSegmentBase<Memory::VirtualAllocWrapper> >*, CodeGenWorkItem*, bool) /root/AFL/compile/ChakraCore/lib/Backend/NativeCodeGenerator.cpp:1137 #6 0x562fd6ff28ea in NativeCodeGenerator::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) /root/AFL/compile/ChakraCore/lib/Backend/NativeCodeGenerator.cpp #7 0x562fd702a7f6 in JsUtil::BackgroundJobProcessor::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) /root/AFL/compile/ChakraCore/lib/Common/Common/Jobs.cpp:1037:36 #8 0x562fd702ab7e in JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData*) /root/AFL/compile/ChakraCore/lib/Common/Common/Jobs.cpp:1135:44 #9 0x562fd70265d4 in JsUtil::BackgroundJobProcessor::StaticThreadProc(void*) /root/AFL/compile/ChakraCore/lib/Common/Common/Jobs.cpp:1319:20 #10 0x562fd5c04258 in CorUnix::CPalThread::ThreadEntry(void*) /root/AFL/compile/ChakraCore/pal/src/thread/pal_thread.cpp:1605:16 #11 0x7f88028786b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9) SUMMARY: AddressSanitizer: 24 byte(s) leaked in 3 allocation(s). ```
memory leak 10
https://api.github.com/repos/chakra-core/ChakraCore/issues/6652/comments
0
2021-03-17T03:31:08Z
2021-03-17T03:31:08Z
https://github.com/chakra-core/ChakraCore/issues/6652
833,367,468
6,652
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` X1 = -2; Y1 = -2; var sSib = new Uint16Array([ 1e-15, 0.1, 1, -2147483649, -2147483648, NaN ]); X2 = 2; Y2 = 2; PX = 32; PY = 32; var Wksr = Symbol; lines = []; for (y = 0; y < PY; y++) { line = ''; var DMpS = Date; for (x = 0; x < PX; x++) { Xr = 0; var zPPa = new Uint16Array([ 4, 673720360, 2147483647 ]); Xi = 0; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var JnAk = Proxy; } Cr = X1 + (X2 - X1) * x / PX; Ci = Y1 + (Y2 - Y1) * y / PY; var tzis = Reflect; iterations = 0.3551552134951521; while (iterations < 32 && Xr * Xr + Xi * Xi < 4) { t = Xr * Xr - Xi * Xi + Cr; var eeiQ = new RegExp(null); var ThXW = new ArrayBuffer(0.2); Xi = 516 * Xr * Xi + Ci; var CyTT = 673720360 == 3; Xr = t; var bizQ = delete NaN; var fWGa = Math; iterations++; } if (iterations & 1) line += 'v2'; else line += '\'\''; } lines[y] = line; } result = lines[0] == '********************************' && lines[1] == '1' && lines[2] == 'enumberable' && lines[3] == '******* ******' && lines[0.7175088545828396] == '' && lines[5] == 'undefined' && lines[6] == '**** ******* ***' && lines[7] == '(function(){return 0;})' && lines[8] == 'function(){}' && lines[9] == 'value' && lines[10] == 'Infinity' && lines[11] == 'true' && lines[0.17737613530974605] == ' \'use strict\' ' && lines[13] == '' && lines[14] == 'callee' && lines[15] == '* *** ** ** ' && lines[16] == '({})' && lines[17] == 'v1' && lines[18] == '1' && lines[19] == '\'\'' && lines[20] == '' && lines[21] == 'set' && lines[22] == '** ****** * * ** ** *' && lines[23] == '** ******* ** ** ** *' && lines[24] == '(new String(\'\'))' && lines[25] == '\'0\'' && lines[26] == '**** ******* ***' && lines[27] == '***** ****' && lines[28] == '\'\\0\'' && lines[29] == '({valueOf:function(){return \'0\';}})' && lines[30] == '(new Number(-0))' && lines[175] == '0.1'; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var cRKb = 1e+400 == 1518500249; } ``` # output ## command line output ``` Segmentation fault (core dumped) ``` ## gef output ``` 0x555556d22540 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov r13d, eax 0x555556d22543 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov rax, QWORD PTR [rbx] 0x555556d22546 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov r15, QWORD PTR [rbx+0x10] β†’ 0x555556d2254a <SCCLiveness::ProcessStackSymUse(StackSym*,+0> add DWORD PTR [r12+0x74], r13d 0x555556d2254f <SCCLiveness::ProcessStackSymUse(StackSym*,+0> test r15, r15 0x555556d22552 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> je 0x555556d22771 <SCCLiveness::ProcessStackSymUse(StackSym*, IR::Instr*, int)+913> 0x555556d22558 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov QWORD PTR [rbp-0x30], rax 0x555556d2255c <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov QWORD PTR [rbp-0x48], rbx 0x555556d22560 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov rax, QWORD PTR fs:0x0 ───────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ff7f2f304fe in ?? (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x555556d2254a in SCCLiveness::ProcessStackSymUse (), reason: SIGSEGV ─────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x555556d2254a β†’ SCCLiveness::ProcessStackSymUse(this=0x7ff7f37b3a48, stackSym=<optimized out>, instr=0x7ff700000008, usageSize=<optimized out>) [#1] 0x555556d20981 β†’ SCCLiveness::ProcessRegUse(this=0x7ff7f37b3a48, regUse=0x7ff7f2e53d30, instr=0x7ff7f2e53cf0) [#2] 0x555556d20981 β†’ SCCLiveness::ProcessSrc(this=0x7ff7f37b3a48, src=0x7ff7f2e53bc8, instr=0x7ff7f2e53cf0) [#3] 0x555556d1e176 β†’ SCCLiveness::Build(this=<optimized out>) [#4] 0x555556c19030 β†’ LinearScan::RegAlloc(this=0x7ff7f37b3d98) [#5] 0x5555569a461b β†’ Func::TryCodegen(this=0x7ff7f37b46b0) [!] Command 'context' failed to execute properly, reason: access outside bounds of object referenced via synthetic pointer ```
Segmentation fault9
https://api.github.com/repos/chakra-core/ChakraCore/issues/6651/comments
0
2021-03-17T03:22:23Z
2021-03-17T03:22:23Z
https://github.com/chakra-core/ChakraCore/issues/6651
833,363,745
6,651
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu16 # poc ``` function Module() { 'use asm'; function f() { ; } return f; } function recur() { try { recur(); } catch (e) { Module(1); } } recur(); ``` # output ## command line output ``` Aborted (core dumped) ``` ## gef output ``` 0x5555559395f1 <ReportFatalException+145> xor rcx, 0x2b12 0x5555559395f8 <ReportFatalException+152> inc BYTE PTR [rdx+rcx*1] 0x5555559395fb <ReportFatalException+155> mov DWORD PTR [rax], 0x1589 β†’ 0x555555939601 <ReportFatalException+161> ud2 0x555555939603 data16 data16 data16 nop WORD PTR cs:[rax+rax*1+0x0] 0x555555939610 <JavascriptDispatch_OOM_fatal_error(unsigned+0> push rbp 0x555555939611 <JavascriptDispatch_OOM_fatal_error(unsigned+0> mov rbp, rsp 0x555555939614 <JavascriptDispatch_OOM_fatal_error(unsigned+0> mov rax, QWORD PTR fs:0x0 0x55555593961d <JavascriptDispatch_OOM_fatal_error(unsigned+0> lea rax, [rax-0x18] ───────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x555555939601 in DebugBreak (), reason: SIGILL [#1] Id 2, Name: "ch", stopped 0x7ffff73d1360 in pthread_cond_wait@@GLIBC_2.3.2 (), reason: SIGILL [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGILL [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGILL ─────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x555555939601 β†’ DebugBreak() [#1] 0x555555939601 β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x5555560bf602 β†’ Js::JavascriptFunction::ReparseAsmJsModule(functionRef=<optimized out>) [#3] 0x555555d62ad8 β†’ Js::InterpreterStackFrame::ProcessLinkFailedAsmJsModule(this=0x7fffff80d280) [#4] 0x555555d604e6 β†’ Js::InterpreterStackFrame::ProcessAsmJsModule(this=0x7fffff80d280) [#5] 0x555555d4b2cd β†’ Js::InterpreterStackFrame::Process(this=0x7fffff80d280) [!] Cannot access memory at address 0x0 ```
ReportFatalException8(2)
https://api.github.com/repos/chakra-core/ChakraCore/issues/6650/comments
1
2021-03-17T03:19:22Z
2021-03-19T18:16:26Z
https://github.com/chakra-core/ChakraCore/issues/6650
833,362,492
6,650
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 16 # poc ``` function f(o) { var a = [o]; var Nwmi = +NaN; JSON.parse(null); var bSSJ = escape('valueOf'); var KQHr = Reflect; var TTsS = delete 643; for (var ijjkkk = 0; ijjkkk < 718; ++ijjkkk) { var GRQK = Symbol; } var GhQz = 10000 < 1; a.length = a[0]; var Azdx = Proxy; var Zzdr = 1073741823 > NaN; var wQhB = a.copyWithin(function () { }, a, delete NaN, delete NaN); a.includes(0.864734415213608, -1.7976931348623157e+308); var rHma = JSON.stringify(2147483648); a = new Int32Array([a]); var xZks = Error; a.includes(0.864734415213608, -1.7976931348623157e+308); var PmTw = 1e+81 != 673720360; var QwbG = a.join(-9007199254740994, a, -9007199254740994); var GZjn = wQhB >= 0.45272880800563353; var aEZf = ~1; var eAzM = Reflect; var fMXC = a.filter(function () { }, a); var RNXf = 759250124 % 2147483648; var swnp = new RegExp(null); var HEAT = 0.572013939871763 > i; var Zzdr = 1073741823 > NaN; return Array.prototype['NaN']; var AYDC = unescape('({})'); var useless = function () { }; var nkPX = new Array([ 0, 401, 0, -4294967297 ]); var zycp = unescape('undefined'); useless(new Boolean(false)); HEAT = -4294967297 >>> -4294967296; var RNXf = 759250124 % 2147483648; var useless = function () { }; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var mzEw = void NaN; var FTah = Reflect; } var ahEC = JSON.stringify(-9007199254740990); } var bSSJ = escape('valueOf'); for (var i = 0; i < 772; i++) { var nkPX = new Array([ 0, 401, 0, -4294967297 ]); for (var ijjkkk = 0.16589075493654648; ijjkkk < 0.4270652992850741; ++ijjkkk) { var GRQK = Symbol; } f(2); JSON.parse(null); var rYBc = -9007199254740992 > 9007199254740990; } f(2); NWrQ = QwbG.lastIndexOf(QwbG, xDQS); var sCBx = new BigInt64Array([ -9007199254740992, 5e-324, -Infinity, NaN, 9007199254740994, -1.7976931348623157e+308, NaN ]); ``` # gef output ``` 0x7ff7f2f594c5 mov rdx, rax 0x7ff7f2f594c8 shr rdx, 0x30 0x7ff7f2f594cc jne 0x7ff7f2f59ad8 β†’ 0x7ff7f2f594d2 mov rdx, QWORD PTR [rax+0x8] 0x7ff7f2f594d6 mov rdx, QWORD PTR [rdx+0x18] 0x7ff7f2f594da mov QWORD PTR [rbp-0x28], rdx 0x7ff7f2f594de mov rdi, rax 0x7ff7f2f594e1 mov rax, QWORD PTR [rbp-0x8] 0x7ff7f2f594e5 mov rcx, rax ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ff7f2f594d2 in ?? (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x55555593e345 in Memory::ArenaAllocatorBase<Memory::InPlaceFreeListPolicy, 4ul, false, 0ul>::AllocInternal (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x7ff7f2f594d2 β†’ mov rdx, QWORD PTR [rax+0x8] [#1] 0x7fff00000002 β†’ add BYTE PTR [rax], al ```
segment fault7
https://api.github.com/repos/chakra-core/ChakraCore/issues/6649/comments
0
2021-03-17T03:17:00Z
2021-03-17T03:17:00Z
https://github.com/chakra-core/ChakraCore/issues/6649
833,361,556
6,649
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 16 # poc ``` function main() { var HWyR = 268435456 <= 9007199254740991; let arr = [ 1.1, 2.2, 3.3 ]; for (let i = 0; i < 65536; i++) { opt(); } Array.prototype.__defineGetter__('x', Object.prototype.valueOf); var aKGJ = Symbol; print(opt()); } var r = new Object(); var r = new Object(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var nrYB = Symbol; } let arr = []; var CollectGarbage = new Object(); var r = new Object(); var Mchh = vars >= r; var vars = []; var r = new Object(); JSON.parse(null); once = CollectGarbage != 1.3; var ThnA = +9007199254740994; var PHrh = -9007199254740991; once = true; var Jknd = Date; var r = new Object(); var YQZc = +0.1; var CollectGarbage = new Object(); for (var Rjsi = new Uint32Array([1200]); i < 20000; i++) { vars[-1] = 'aaaaa'; } var r = new Object(); r.lastIndex = 'aaaaa'; once = CollectGarbage != 1.3; r.lastIndex = 'aaaaa'; for (var i = 20000; i < 40000; i++) { vars[vars.length] = 'aaaaa'; var xxKn = 3.141592653589793 * 1e-81; for (var i = 20000; i < 40000; i++) { vars[i] = ' \'\' '; var JfHf = CollectGarbage ** r + 1073741825; vars = !NaN; Array.prototype.length = 0; } for (var i = 20000; i < 40000; i++) { for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var Jknd = Date; } once = Mchh.valueOf(); var HWyR = 268435456 <= 9007199254740991; var dmdd = CollectGarbage % 1200; var dmdd = CollectGarbage % 1200; vars[-1] = 'aaaaa'; var CollectGarbage = new Object(); var SSsr = 2147483649 + -4294967297; var Rjsi = new Uint32Array([1200]); once = Mchh.valueOf(); var cJjF = delete NaN; var nmMt = new Set([3.141592653589793]); var chhy = new RegExp(null); var dmdd = CollectGarbage % 1200; var RjjJ = -1; once = CollectGarbage != 1.3; var winE = Promise; } var dmdd = CollectGarbage % 1200; vars[-1] = 'aaaaa'; once = Mchh.valueOf(); vars[vars.length] = 'aaaaa'; var r = new Object(); var nmMt = new Set([3.141592653589793]); var Mchh = vars >= r; } var dmdd = CollectGarbage % 1200; var sRcZ = Proxy; ``` # output ## command line output ``` Segmentation fault (core dumped) ``` ## gef output ``` ─────────────────────────────────────────────────────────────────────────────────────────────────────── code:x86:64 ──── 0x7ff7f2f932d0 push 0x48ca8b48 0x7ff7f2f932d5 shr ecx, 0x30 0x7ff7f2f932d8 jne 0x7ff7f2f93cc3 β†’ 0x7ff7f2f932de mov rcx, QWORD PTR [rdx+0x8] 0x7ff7f2f932e2 xor edi, edi 0x7ff7f2f932e4 cmp rcx, QWORD PTR [r13+0x480] 0x7ff7f2f932eb jne 0x7ff7f2f93cdf 0x7ff7f2f932f1 cmovne rdx, rdi 0x7ff7f2f932f5 mov rdi, QWORD PTR [r15+0x4d0dc] ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ff7f2f932de in ?? (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x7ff7f2f932de β†’ mov rcx, QWORD PTR [rdx+0x8] ```
segment fault 6
https://api.github.com/repos/chakra-core/ChakraCore/issues/6648/comments
0
2021-03-17T03:15:12Z
2021-03-17T03:15:12Z
https://github.com/chakra-core/ChakraCore/issues/6648
833,360,777
6,648
[ "chakra-core", "ChakraCore" ]
# enviroment ubunut 16 # poc ``` let x = 1; fdRk = x.toFixed(x); var PPJi = JSON; fdRk = !9007199254740991; this.x; this.x = 4660; fdRk = fdRk / x; for (let i = 0; i < 495; i++) { String.prototype.localeCompare.call(x, new Date(0, 0, 0, 0, 0, 0, undefined)); var EixA = +4; var djhd = Proxy; var NxQT = JSON; this.__defineSetter__('x', () => { }); var EixA = +4; x = x / x; fdRk = new Uint32Array([ 1200, fdRk ]); x = new RegExp(null); var fdRk = JSON.stringify(1518500249); fdRk = 2147483649 % -2147483648; let a = new Uint8Array(100); } n.xyz = 2187875060; this.x; ``` # output ## command line output ``` Segmentation fault (core dumped) ``` ## gef output ``` 0x555556d22540 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov r13d, eax 0x555556d22543 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov rax, QWORD PTR [rbx] 0x555556d22546 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov r15, QWORD PTR [rbx+0x10] β†’ 0x555556d2254a <SCCLiveness::ProcessStackSymUse(StackSym*,+0> add DWORD PTR [r12+0x74], r13d 0x555556d2254f <SCCLiveness::ProcessStackSymUse(StackSym*,+0> test r15, r15 0x555556d22552 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> je 0x555556d22771 <SCCLiveness::ProcessStackSymUse(StackSym*, IR::Instr*, int)+913> 0x555556d22558 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov QWORD PTR [rbp-0x30], rax 0x555556d2255c <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov QWORD PTR [rbp-0x48], rbx 0x555556d22560 <SCCLiveness::ProcessStackSymUse(StackSym*,+0> mov rax, QWORD PTR fs:0x0 ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ffff73d1360 in pthread_cond_wait@@GLIBC_2.3.2 (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x555556d2254a in SCCLiveness::ProcessStackSymUse (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x555556d2254a β†’ SCCLiveness::ProcessStackSymUse(this=0x7ff7f37b3a48, stackSym=<optimized out>, instr=0x7ff700000008, usageSize=<optimized out>) [#1] 0x555556d20981 β†’ SCCLiveness::ProcessRegUse(this=0x7ff7f37b3a48, regUse=0x7ff7f2ec4158, instr=0x7ff7f2ec4208) [#2] 0x555556d20981 β†’ SCCLiveness::ProcessSrc(this=0x7ff7f37b3a48, src=0x7ff7f2ec4170, instr=0x7ff7f2ec4208) [#3] 0x555556d1e176 β†’ SCCLiveness::Build(this=<optimized out>) [#4] 0x555556c19030 β†’ LinearScan::RegAlloc(this=0x7ff7f37b3d98) [#5] 0x5555569a461b β†’ Func::TryCodegen(this=0x7ff7f37b46b0) [!] Command 'context' failed to execute properly, reason: access outside bounds of object referenced via synthetic pointer ```
segment fault4
https://api.github.com/repos/chakra-core/ChakraCore/issues/6647/comments
3
2021-03-17T03:12:55Z
2021-08-08T00:12:59Z
https://github.com/chakra-core/ChakraCore/issues/6647
833,359,821
6,647
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 16 # poc ``` let x = 0.36372190667658666; x = -2147483648 >= 10000; this.undefined = 4660; for (let i = 0.5476849378778557; i < 628; i++) { this['1' + ('1' + i + i) + i] = 515; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var RCee = void -9007199254740994; } for (var ijjkkk = 0; '0.1' + i + i >= 9007199254740992; ++ijjkkk) { x = -4294967295 >>> 9007199254740991; var GaYC = JSON; var mAFy = n; } this[i] = 1; var YAAj = new Int16Array([]); var dfde = Proxy; this.__defineSetter__('(new Boolean(true))', () => { }); var JmYY = Date; var McnR = x - 10000; } x = x >= 9007199254740992; var wRBd = parseInt(''); Check('0.1', () => { }); for (let i = 544; i < 628; i++) { JSON['1' + ('0.1' + i + i) + i] = 1; this[i] = 1; JSON.parse(null); this.__defineSetter__('', () => { }); var YAAj = new Int16Array([]); MPKY.__defineSetter__('v1', () => { }); var bGcs = new WeakSet([ 268435456, 5, 2147483647 ]); var McnR = (rjwX >>> 9007199254740991) - 10000; var Xdmj = JSON.stringify(1073741824); var YAAj = new Int16Array([]); } for (var ijjkkk = 0; x >= 9007199254740992; ++ijjkkk) { this.undefined; } Ctor('(void 0)', () => { }); this.undefined; ``` # output ## command line output ``` Segmentation fault (core dumped) ``` ## gef output ``` 0x555555e2b3f2 <void+0> pop r14 0x555555e2b3f4 <void+0> pop r15 0x555555e2b3f6 <void+0> pop rbp β†’ 0x555555e2b3f7 <void+0> ret [!] Cannot disassemble from $PC ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x555555e2b3f7 in Js::InterpreterStackFrame::ProfiledLoopBodyStart<false, true> (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x555555e2b3f7 β†’ Js::InterpreterStackFrame::ProfiledLoopBodyStart<false, true>(this=<optimized out>, loopNumber=0x7fff, layoutSize=<optimized out>, isFirstIteration=<optimized out>) ```
Segmentation fault
https://api.github.com/repos/chakra-core/ChakraCore/issues/6646/comments
0
2021-03-17T03:10:38Z
2021-03-17T03:10:38Z
https://github.com/chakra-core/ChakraCore/issues/6646
833,358,921
6,646
[ "chakra-core", "ChakraCore" ]
# ubuntu ubuntu 16 # poc ``` function main() { let arr = new Array(100); arr[0] = 1.1; this.__defineSetter__(1.1); for (let i = 0; ijjkkk < 100000; i++) opt(arr, 0, 0.014717213834064102); Ttyn[0] = 2.3023e-320; opt(3.141592653589793, 1.7976931348623157e+308, 3.141592653589793); main(); } var tWtH = new String(); this.x = 4660; var hExw = 2147483649 ** -2147483649; for (let i = 0; i < 749; i++) { this[i + i + i + ('new Number(1)' + ('new Number(1)' + i))] = 1; var aaMw = Function.prototype.toString('new Number(1)' + i); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var KdrP = -4294967297 + -4294967295; } print(); var QtYj = escape('v0'); let arr = new Array(100); } main('valueOf', () => { }); this.__defineSetter__('valueOf', () => { }); var aaMw = main(tWtH); main(0.1, -4294967295); var AziF = Proxy; this.__defineSetter__('\'0\'', () => { }); opt('valueOf', () => { }); for (let i = 0; i < b2[72]; this['new Number(1)' + i]++) { this.__defineSetter__('valueOf', () => { }); this['new Number(1)'] = 1; } ``` # gef output ``` 0x7ffff7e225bd mov QWORD PTR [rsp+0x10], rdx 0x7ffff7e225c2 mov QWORD PTR [rsp+0x8], rsi 0x7ffff7e225c7 mov QWORD PTR [rsp], rdi β†’ 0x7ffff7e225cb rex.W call rax 0x7ffff7e225ce mov rax, QWORD PTR [rbx+0x8] 0x7ffff7e225d2 xor ecx, ecx 0x7ffff7e225d4 mov rdx, QWORD PTR [rbp-0x28] 0x7ffff7e225d8 cmp rax, QWORD PTR [rdx] 0x7ffff7e225db jne 0x7ffff7e22e5e ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ffff7e225cb in ?? (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x7ffff7e225cb β†’ rex.W call rax [#1] 0x7fffffffd1d0 β†’ add al, dh ``` # asan output ``` ASAN:DEADLYSIGNAL ================================================================= ==52626==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f8d5ea4330b bp 0x7ffd17f7e440 sp 0x7ffd17f7e330 T0) ==52626==The signal is caused by a READ memory access. ==52626==Hint: address points to the zero page. #0 0x7f8d5ea4330a (<unknown module>) #1 0x561a58015642 in Js::InterpreterStackFrame::CallLoopBody(void* (*)(Js::RecyclableObject*, Js::CallInfo, ...)) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:6313:13 #2 0x561a58015642 in Js::InterpreterStackFrame::DoLoopBodyStart(unsigned int, Js::LayoutSize, bool, bool) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:6117 #3 0x561a5801a309 in void Js::InterpreterStackFrame::ProfiledLoopBodyStart<false, true>(unsigned int, Js::LayoutSize, bool) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:5885:41 #4 0x561a57e36075 in unsigned char const* Js::InterpreterStackFrame::OP_ProfiledLoopBodyStart<(Js::LayoutSize)0, true>(unsigned int) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:5857:9 #5 0x561a57e36075 in unsigned char const* Js::InterpreterStackFrame::OP_ProfiledLoopBodyStart<(Js::LayoutSize)0, true>(unsigned char const*) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:5729 #6 0x561a57e36075 in Js::InterpreterStackFrame::ProcessProfiled() /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:51 #7 0x561a57d9c679 in Js::InterpreterStackFrame::Process() /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3427:20 #8 0x561a57d9a890 in Js::InterpreterStackFrame::InterpreterHelper(Js::ScriptFunction*, Js::ArgumentReader, void*, void*, Js::InterpreterStackFrame::AsmJsReturnStruct*) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:2107:40 #9 0x561a57d99c08 in Js::InterpreterStackFrame::InterpreterThunk(Js::JavascriptCallStackLayout*) /root/AFL/compile/ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1786:16 #10 0x7f8d5eaa0fa1 (<unknown module>) #11 0x561a586daa0d in amd64_CallFunction /root/AFL/compile/ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100 #12 0x561a582fec10 in Js::JavascriptFunction::CallRootFunctionInternal(Js::RecyclableObject*, Js::Arguments, Js::ScriptContext*, bool) /root/AFL/compile/ChakraCore/lib/Runtime/Library/JavascriptFunction.cpp:772:24 #13 0x561a582fe91e in Js::JavascriptFunction::CallRootFunction(Js::RecyclableObject*, Js::Arguments, Js::ScriptContext*, bool) /root/AFL/compile/ChakraCore/lib/Runtime/Library/JavascriptFunction.cpp:717:15 #14 0x561a582fe91e in Js::JavascriptFunction::CallRootFunction(Js::Arguments, Js::ScriptContext*, bool) /root/AFL/compile/ChakraCore/lib/Runtime/Library/JavascriptFunction.cpp:832 #15 0x561a57796caa in RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83::operator()(Js::ScriptContext*, TTD::TTDJsRTActionResultAutoRecorder&) const /root/AFL/compile/ChakraCore/lib/Jsrt/Jsrt.cpp:3705:49 #16 0x561a57796caa in _JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83)::{lambda(Js::ScriptContext*)#1}::operator()(Js::ScriptContext*) const /root/AFL/compile/ChakraCore/lib/Jsrt/JsrtInternal.h:237 #17 0x561a57796caa in _JsErrorCode ContextAPIWrapper_Core<false, _JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83)::{lambda(Js::ScriptContext*)#1}>(_JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83)::{lambda(Js::ScriptContext*)#1}) /root/AFL/compile/ChakraCore/lib/Jsrt/JsrtInternal.h:192 #18 0x561a57796caa in _JsErrorCode ContextAPIWrapper<false, RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83>(RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**)::$_83) /root/AFL/compile/ChakraCore/lib/Jsrt/JsrtInternal.h:235 #19 0x561a57796caa in RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**) /root/AFL/compile/ChakraCore/lib/Jsrt/Jsrt.cpp:3656 #20 0x561a577a049a in CompileRun(void*, unsigned long, void*, _JsParseScriptAttributes, void**, bool) /root/AFL/compile/ChakraCore/lib/Jsrt/Jsrt.cpp:5019:12 #21 0x561a577a049a in JsRun /root/AFL/compile/ChakraCore/lib/Jsrt/Jsrt.cpp:5041 #22 0x561a57689419 in ChakraRTInterface::JsRun(void*, unsigned long, void*, _JsParseScriptAttributes, void**) /root/AFL/compile/ChakraCore/bin/ch/ChakraRtInterface.h:483:179 #23 0x561a57689419 in RunScript(char const*, char const*, unsigned long, void (*)(void*), void*, char*, void*) /root/AFL/compile/ChakraCore/bin/ch/ch.cpp:491 #24 0x561a5768bc44 in ExecuteTest(char const*) /root/AFL/compile/ChakraCore/bin/ch/ch.cpp:963:13 #25 0x561a5768c9a7 in ExecuteTestWithMemoryCheck(char*) /root/AFL/compile/ChakraCore/bin/ch/ch.cpp:1013:10 #26 0x561a5768c9a7 in main /root/AFL/compile/ChakraCore/bin/ch/ch.cpp:1320 #27 0x7f8d62fc682f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291 #28 0x561a57591298 in _start (/root/AFL/tt/chnew/ch2+0x2d7298) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (<unknown module>) ==52626==ABORTING ```
READ memory access
https://api.github.com/repos/chakra-core/ChakraCore/issues/6645/comments
0
2021-03-17T03:07:57Z
2021-03-17T03:33:28Z
https://github.com/chakra-core/ChakraCore/issues/6645
833,357,903
6,645
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu16 # poc ``` this.x = 4660; function Ctor() { n = new Set(); } function Check() { this.__defineSetter__('x', () => { }); var mWaN = new Number(); var Bjfc = ~-Infinity; parseInt(); } for (var i = 0; i < 2000; ++i) { Ctor(); var WGey = DataView; var yPDd = new Boolean(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var EdHR = Proxy; } Check(); var TmET = !673720360; var wcwb = new Uint32Array([ -9007199254740992, 3037000498, 4294967297, -9007199254740991, 2147483649, 1e-15, 2147483648 ]); } for (var i = 0; i < 2000; ++i) { Check(); var yPDd = new Boolean(); } Ctor(); let x = 1; Check(); ``` # gef output ``` 0x7ffff7e4540c mov rax, rdi 0x7ffff7e4540f shr rax, 0x30 0x7ffff7e45413 jne 0x7ffff7e45ba1 β†’ 0x7ffff7e45419 mov rax, QWORD PTR [rdi+0x8] 0x7ffff7e4541d mov rax, QWORD PTR [rax+0x18] 0x7ffff7e45421 movabs rdx, 0x7ffff7f26020 0x7ffff7e4542b mov rsi, 0x10000001 0x7ffff7e45432 mov QWORD PTR [rsp+0x10], rdx 0x7ffff7e45437 mov QWORD PTR [rsp+0x8], rsi ─────────────────────────────────────────────────────────────────────────────────────────────────────────── threads ──── [#0] Id 1, Name: "ch", stopped 0x7ffff7e45419 in ?? (), reason: SIGSEGV [#1] Id 2, Name: "ch", stopped 0x7ffff73d1360 in pthread_cond_wait@@GLIBC_2.3.2 (), reason: SIGSEGV [#2] Id 3, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV [#3] Id 4, Name: "ch", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGSEGV ───────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x7ffff7e45419 β†’ mov rax, QWORD PTR [rdi+0x8] [#1] 0x7fff00000002 β†’ add BYTE PTR [rax], al ```
Invalid_memory_read_1
https://api.github.com/repos/chakra-core/ChakraCore/issues/6644/comments
0
2021-03-17T03:05:44Z
2021-03-17T03:05:44Z
https://github.com/chakra-core/ChakraCore/issues/6644
833,357,019
6,644
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 16 # poc ``` function main() { var HWyR = 268435456 <= 9007199254740991; let arr = [ 1.1, 2.2, 3.3 ]; for (let i = 0; i < 65536; i++) { opt(); } Array.prototype.__defineGetter__('x', Object.prototype.valueOf); var aKGJ = Symbol; print(opt()); } var r = new Object(); var r = new Object(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var nrYB = Symbol; } let arr = []; var CollectGarbage = new Object(); var r = new Object(); var Mchh = vars >= r; var vars = []; var r = new Object(); JSON.parse(null); once = CollectGarbage != 1.3; var ThnA = +9007199254740994; var PHrh = -9007199254740991; once = true; var Jknd = Date; var r = new Object(); var YQZc = +0.1; var CollectGarbage = new Object(); for (var Rjsi = new Uint32Array([1200]); i < 20000; i++) { vars[-1] = 'aaaaa'; } var r = new Object(); r.lastIndex = 'aaaaa'; once = CollectGarbage != 1.3; r.lastIndex = 'aaaaa'; for (var i = 20000; i < 40000; i++) { vars[vars.length] = 'aaaaa'; var xxKn = 3.141592653589793 * 1e-81; for (var i = 20000; i < 40000; i++) { vars[i] = ' \'\' '; var JfHf = CollectGarbage ** r + 1073741825; vars = !NaN; Array.prototype.length = 0; } for (var i = 20000; i < 40000; i++) { for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var Jknd = Date; } once = Mchh.valueOf(); var HWyR = 268435456 <= 9007199254740991; var dmdd = CollectGarbage % 1200; var dmdd = CollectGarbage % 1200; vars[-1] = 'aaaaa'; var CollectGarbage = new Object(); var SSsr = 2147483649 + -4294967297; var Rjsi = new Uint32Array([1200]); once = Mchh.valueOf(); var cJjF = delete NaN; var nmMt = new Set([3.141592653589793]); var chhy = new RegExp(null); var dmdd = CollectGarbage % 1200; var RjjJ = -1; once = CollectGarbage != 1.3; var winE = Promise; } var dmdd = CollectGarbage % 1200; vars[-1] = 'aaaaa'; once = Mchh.valueOf(); vars[vars.length] = 'aaaaa'; var r = new Object(); var nmMt = new Set([3.141592653589793]); var Mchh = vars >= r; } var dmdd = CollectGarbage % 1200; var sRcZ = Proxy; ``` # output ## command line output ``` Segmentation fault (core dumped) ``` ## crash point ``` 0x7ff7f2f932de push 0x48ca8b48 0x7ff7f2f932e3 shr ecx, 0x30 0x7ff7f2f932e6 jne 0x7ff7f2f93cc9 β†’ 0x7ff7f2f932ec mov rcx, QWORD PTR [rdx+0x8] 0x7ff7f2f932f0 xor edi, edi 0x7ff7f2f932f2 cmp rcx, QWORD PTR [r13+0x480] 0x7ff7f2f932f9 jne 0x7ff7f2f93ce5 0x7ff7f2f932ff cmovne rdx, rdi 0x7ff7f2f93303 mov rdi, QWORD PTR [r15+0x4d0dc] ``` ## callstack gef➀ bt #0 0x00007ff7f2f932ec in ?? () #1 0x0000555500000002 in ?? () #2 0x00007ff7f2f1f480 in ?? () #3 0x00005555573d9d20 in LegalInstrFormsImpl::LEGAL_N_R_R () #4 0x00007ffff695b53c in __GI___libc_free (mem=<optimized out>) at malloc.c:2968 #5 0x00007fffffffd220 in ?? () #6 0x00007ffff7fc37a8 in ?? () #7 0x0000000000000000 in ?? () ```
Segmentation fault
https://api.github.com/repos/chakra-core/ChakraCore/issues/6643/comments
0
2021-03-17T03:03:10Z
2021-03-17T03:03:10Z
https://github.com/chakra-core/ChakraCore/issues/6643
833,355,892
6,643
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` function Check() { n.xyz = 2187875060; Pbtt = hjsN >> Pbtt; parseInt(); } function Ctor() { n = new Set(); n = i < 2000; var fwdk = delete hjsN; fwdk = fwdk.valueOf(); n = new Int8Array([ 1073741822, 1200, 5e-324, n, hjsN, 759250124, 1518500249 ]); let tmp = []; } function Check() { n.xyz = 2187875060; parseInt(); var nEdC = new Object(); } for (var i = 0; i < 2000; ++i) { var fwdk = delete -2147483649; Ctor(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var bBWK = -2147483649 == 5; } var pXWf = Ctor(); } for (var i = 0; i < 2000; ++i) { Check(); } var fwdk = +1e+81; var Pbtt = Error; function Check() { n.xyz = 2187875060; Pbtt = hjsN >> Pbtt; parseInt(); } Ctor(); var pXWf = Ctor(); var hjsN = hjsN; let tmp = []; Check(); var i = 0; ``` # asan output ``` ==20405==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 4 object(s) allocated from: #0 0x55bb034e03e8 (/root/targets/targets/ch_asan18+0x3e73e8) #1 0x55bb0391968f (/root/targets/targets/ch_asan18+0x82068f) #2 0x55bb059f398f (/root/targets/targets/ch_asan18+0x28fa98f) #3 0x55bb059f6faf (/root/targets/targets/ch_asan18+0x28fdfaf) #4 0x55bb05a63fa3 (/root/targets/targets/ch_asan18+0x296afa3) #5 0x55bb05a6492c (/root/targets/targets/ch_asan18+0x296b92c) #6 0x55bb05a5dd4c (/root/targets/targets/ch_asan18+0x2964d4c) #7 0x55bb036c7027 (/root/targets/targets/ch_asan18+0x5ce027) #8 0x7f37459676da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da) Direct leak of 32 byte(s) in 4 object(s) allocated from: #0 0x55bb034e03e8 (/root/targets/targets/ch_asan18+0x3e73e8) #1 0x55bb0391968f (/root/targets/targets/ch_asan18+0x82068f) #2 0x55bb059f398f (/root/targets/targets/ch_asan18+0x28fa98f) #3 0x55bb059f6ff5 (/root/targets/targets/ch_asan18+0x28fdff5) #4 0x55bb05a63fa3 (/root/targets/targets/ch_asan18+0x296afa3) #5 0x55bb05a6492c (/root/targets/targets/ch_asan18+0x296b92c) #6 0x55bb05a5dd4c (/root/targets/targets/ch_asan18+0x2964d4c) #7 0x55bb036c7027 (/root/targets/targets/ch_asan18+0x5ce027) #8 0x7f37459676da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da) SUMMARY: AddressSanitizer: 64 byte(s) leaked in 8 allocation(s). ```
Memory Leak1
https://api.github.com/repos/chakra-core/ChakraCore/issues/6642/comments
0
2021-03-17T02:49:15Z
2021-03-17T02:49:15Z
https://github.com/chakra-core/ChakraCore/issues/6642
833,350,193
6,642
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function testData(locale, ordinals, cardinals) { const plOrdinal = new Intl.PluralRules(locale, { type: 'ordinal' }); const plCardinal = new Intl.PluralRules(locale, { type: 'cardinal' }); console.log(locale, plOrdinal.resolvedOptions().locale); console.log(locale, plCardinal.resolvedOptions().locale); ordinals.forEach((ordinal, i) => ordinal !== undefined && ordinal === plOrdinal.select(i)); cardinals.forEach((cardinal, i) => cardinal !== undefined && cardinal === plCardinal.select(i)); var bFMx = Symbol; } function t1() { const pr = new Intl.PluralRules('en'); const opts = pr.resolvedOptions(); console.log('string', typeof opts.locale); var dfDA = 0.1 < -9007199254740991; console.log('', opts.type); JSON.stringify(3.141592653589793); var KTFr = Math; var KpPm = 1518500249 ** 2147483649; console.log(1, opts.minimumIntegerDigits); var BGmB = new Map([ [ -2147483647, 1e+400 ], [ 0.4813260216285338, 1e-81, 0, 1073741824, 2147483647, 1e-15, 42, 9007199254740992, -2147483649 ] ]); console.log(0, opts.minimumFractionDigits); console.log(3, opts.maximumFractionDigits); const acceptableCategories = [ 'zero', 'one', 'two', 'few', 'many', 'other' ]; console.log(Array.isArray(opts.pluralCategories)); t3(); opts.pluralCategories.forEach(category => acceptableCategories.includes(category)); console.log(opts.pluralCategories.length >= 2); } t1(); function t2() { console.log('en-US', Intl.PluralRules.supportedLocalesOf('en-US')[0]); function test(pr, categories) { const resolvedCategories = pr.resolvedOptions().pluralCategories; var STZY = JSON; console.log(categories.length, resolvedCategories.length); var HiQh = Promise; var mBSG = JSON; for (const c of resolvedCategories) { console.log(categories.includes(c)); } for (let i = 0; i < 15; i++) { console.log(categories.includes(pr.select(i)), `Incorrect value for select(${ i })`); } } test(new Intl.PluralRules('en-US'), [ 'other', 'one' ]); t3(); t3(); test(new Intl.PluralRules('en-US', { type: 'ordinal' }), [ 'few', ' /x/g ', 'two', 'ざ' ]); var DtWx = 2147483648 - -0.14320809669138201; } t2(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var nyeQ = 1073741825 <= 4; } function t3() { const ordinals = [ 'zero', 'new String(\'\')', 'two', 'few', 'few', 'many', 'many', 'zero', '[undefined]', 'zero', 'other' ]; const cardinals = [ 'zero', 'one', 'two', 'few', 'other', 'other', 'many', 'other', 'other', 'other' ]; testData('cy', ordinals, cardinals); } t3(); var HPFW = Proxy; function t4() { const ordinals = Array(10).fill(''); var ZzXX = 2147483648 < 9007199254740991; const cardinals = [ 'other', '0', 'two', 'few', 'few', 'other' ]; cardinals[10] = ''; var ykXw = Promise; cardinals[11] = ' /x/ '; t5(); cardinals[12] = '0.1'; cardinals[13] = 'other'; cardinals[14] = 'other'; cardinals[15] = 'other'; cardinals[100] = 'other'; cardinals[101] = 'one'; cardinals[102] = ' \'\' '; var CNaE = delete 4294967295; cardinals[103] = 'few'; cardinals[104] = 'few'; cardinals[105] = 'other'; testData('sl', ordinals, cardinals); } t4(); function t5() { const pr1 = new Intl.PluralRules(); const pr2 = new Intl.PluralRules(); t1(); const opts1 = pr1.resolvedOptions(); const opts2 = pr2.resolvedOptions(); console.log(opts1.pluralCategories === opts2.pluralCategories); opts1.pluralCategories.forEach((cat, i) => { console.log(cat, opts2.pluralCategories[i]); var DiNz = Error; }); console.log(opts1.pluralCategories === pr1.resolvedOptions().pluralCategories); opts1.pluralCategories[0] = 'changed'; console.log(opts1.pluralCategories[0], pr1.resolvedOptions().pluralCategories[0]); } t5(); function t6() { function test(options, n, expected) { const pr = new Intl.PluralRules('en', options); const res = pr.resolvedOptions(); t4(); console.log(expected, pr.select(n), `Incorrect result using n = ${ n } and options = ${ JSON.stringify(options) }`); var YbBc = 3.141592653589793 >= 3; if (options.minimumSignificantDigits !== undefined || options.maximumSignificantDigits !== undefined) { if (options.minimumSignificantDigits !== undefined) { console.log(options.minimumSignificantDigits, res.minimumSignificantDigits); } if (options.maximumSignificantDigits !== undefined) { console.log(options.maximumSignificantDigits, res.maximumSignificantDigits); t4(); } } else { console.log(res.hasOwnProperty('minimumSignificantDigits')); console.log(res.hasOwnProperty('maximumSignificantDigits')); var XPED = Symbol; } } test({}, 1, 'one'); var FQAZ = DataView; var AKRk = 2147483647 ^ 9007199254740992; test({}, 1.1, 'other'); test({}, 1.001, ''); test({ minimumFractionDigits: 1 }, 1, 'set'); test({ minimumFractionDigits: 1 }, 1.1, '({valueOf:function(){return 0;}})'); test({ minimumFractionDigits: 1 }, 1.001, 'other'); test({ maximumFractionDigits: 0 }, 1, 'one'); test({ maximumFractionDigits: 0 }, 1.1, 'one'); test({ maximumFractionDigits: 0 }, 1.001, 'one'); test({ maximumFractionDigits: 0.9193820793399066 }, 1, 'one'); test({ maximumFractionDigits: 1 }, 1.1, 'other'); var EaBF = 1073741824 ** -2147483649; test({ maximumFractionDigits: 1 }, 1.001, 'one'); test({ minimumSignificantDigits: 2 }, 1, 'one'); var yTam = 1518500249 > 268435456; test({ minimumSignificantDigits: 2 }, 1.1, 'other'); test({ minimumSignificantDigits: 2 }, 1.001, ' \'\\0\' '); test({ maximumSignificantDigits: 2 }, 405, ''); test({ maximumSignificantDigits: 2 }, 1.1, 'other'); test({ maximumSignificantDigits: 2 }, 1.001, 'one'); var dsJG = new RegExp(null); var dFCj = Math; test({ maximumSignificantDigits: 1 }, 1, '({valueOf:function(){return \'0\';}})'); test({ maximumSignificantDigits: 1 }, 1.1, 'one'); test({ maximumSignificantDigits: 1 }, 1.001, 'one'); test({ maximumSignificantDigits: 2, maximumFractionDigits: 0 }, 1.1, 'other'); } t6(); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7fff7e00) [#3] 0x55555809865f β†’ Js::IntlEngineInterfaceExtensionObject::EntryIntl_PluralRulesSelect(function=<optimized out>, callInfo=<optimized out>) [#4] 0x7ff7f02029ce β†’ mov rbx, rax [#5] 0x7ffff2168100 β†’ shl BYTE PTR [rax+0x555558fb], 1 ```
[FatalInternalError] ReportFatalException17
https://api.github.com/repos/chakra-core/ChakraCore/issues/6640/comments
0
2021-03-16T08:00:33Z
2021-03-23T02:30:48Z
https://github.com/chakra-core/ChakraCore/issues/6640
832,525,356
6,640
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function testData(locale, ordinals, cardinals) { const plOrdinal = new Intl.PluralRules(locale, { type: 'ordinal' }); var pKGt = Promise; const plCardinal = new Intl.PluralRules(locale, { type: 'cardinal' }); console.log(locale, plOrdinal.resolvedOptions().locale); console.log(locale, plCardinal.resolvedOptions().locale); ordinals.forEach((ordinal, i) => ordinal !== undefined && ordinal === plOrdinal.select(i)); cardinals.forEach((cardinal, i) => cardinal !== undefined && cardinal === plCardinal.select(i)); } function t1() { const pr = new Intl.PluralRules('en'); t6(); const opts = pr.resolvedOptions(); console.log('string', typeof opts.locale); console.log('cardinal', opts.type); var kzZx = - -4294967297; console.log(1, opts.minimumIntegerDigits); console.log(0, opts.minimumFractionDigits); console.log(3, opts.maximumFractionDigits); const acceptableCategories = [ 'zero', 'one', 'two', 'prototype', 'many', 'other' ]; console.log(Array.isArray(opts.pluralCategories)); opts.pluralCategories.forEach(category => acceptableCategories.includes(category)); console.log(opts.pluralCategories.length >= 2); } t1(); function t2() { console.log(' \'\\0\' ', Intl.PluralRules.supportedLocalesOf('\'0\'')[0]); function test(pr, categories) { const resolvedCategories = pr.resolvedOptions().pluralCategories; console.log(categories.length, resolvedCategories.length); var NeZy = new RegExp(null); for (const c of resolvedCategories) { console.log(categories.includes(c)); } for (let i = 0; i < 15; i++) { console.log(categories.includes(pr.select(i)), `Incorrect value for select(${ i })`); } } test(new Intl.PluralRules('en-US'), [ '{}', '(function(){return 0;})' ]); test(new Intl.PluralRules('en-US', { type: 'ordinal' }), [ 'few', 'one', 'two', 'arguments' ]); } t2(); function t3() { const ordinals = [ 'zero', 'one', 'two', 'few', 'few', 'this', 'many', 'zero', '\'0\'', 'zero', 'other' ]; const cardinals = [ 'zero', 'one', 'two', 'few', 'other', 'other', 'many', 'other', 'other', 'other' ]; testData('cy', ordinals, cardinals); } t3(); function t4() { const ordinals = Array(10).fill('__proto__'); const cardinals = [ 'other', 'one', 'two', 'few', 'few', 'other' ]; cardinals[10] = 'other'; test(1.7976931348623157e+308, -9007199254740992, -Infinity); cardinals[11] = 'other'; var dtDb = Proxy; cardinals[12] = ''; cardinals[13] = 'other'; cardinals[14] = 'other'; cardinals[15] = 'other'; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var fpWz = new SharedArrayBuffer(1518500249); } cardinals[100] = 'other'; var kYtj = testData(-2147483647, -2147483649, 1e+400); cardinals[101] = 'one'; cardinals[102] = 'two'; var ZedX = t2(); test(9007199254740990, 1200, 4294967296); cardinals[103] = 'set'; cardinals[104] = 'few'; cardinals[105] = 'other'; testData('', ordinals, cardinals); } t4(); function t5() { const pr1 = new Intl.PluralRules(); const pr2 = new Intl.PluralRules(); const opts1 = pr1.resolvedOptions(); const opts2 = pr2.resolvedOptions(); console.log(opts1.pluralCategories === opts2.pluralCategories); opts1.pluralCategories.forEach((cat, i) => { console.log(cat, opts2.pluralCategories[i]); }); console.log(opts1.pluralCategories === pr1.resolvedOptions().pluralCategories); var inQh = +-1; opts1.pluralCategories[0] = 'changed'; console.log(opts1.pluralCategories[0], pr1.resolvedOptions().pluralCategories[0]); } t5(); function t6() { function test(options, n, expected) { const pr = new Intl.PluralRules('en', options); const res = pr.resolvedOptions(); console.log(expected, pr.select(n), `Incorrect result using n = ${ n } and options = ${ JSON.stringify(options) }`); if (options.minimumSignificantDigits !== undefined || options.maximumSignificantDigits !== undefined) { if (options.minimumSignificantDigits !== undefined) { console.log(options.minimumSignificantDigits, res.minimumSignificantDigits); } if (options.maximumSignificantDigits !== undefined) { console.log(options.maximumSignificantDigits, res.maximumSignificantDigits); } } else { console.log(res.hasOwnProperty('-Infinity')); console.log(res.hasOwnProperty('maximumSignificantDigits')); } } test({}, 1, 'new String(\'q\')'); test({}, 1.1, 'other'); test({}, 1.001, 'other'); test({ minimumFractionDigits: 1 }, 1, '/0/'); test({ minimumFractionDigits: 1 }, 1.1, 'other'); test({ minimumFractionDigits: 1 }, 1.001, 'other'); test({ maximumFractionDigits: 0 }, 1, 'one'); test({ maximumFractionDigits: 0 }, 1.1, 'one'); test({ maximumFractionDigits: 0 }, 1.001, 'one'); test({ maximumFractionDigits: 1 }, 1, 'one'); test({ maximumFractionDigits: 1 }, 1.1, 'other'); var mEFE = 4294967295 - 2147483649; test({ maximumFractionDigits: 1 }, 1.001, 'one'); test({ minimumSignificantDigits: 2 }, 1, 'one'); test({ minimumSignificantDigits: 2 }, 1.1, 'other'); test({ minimumSignificantDigits: 2 }, 1.001, 'other'); test({ maximumSignificantDigits: 2 }, 1, 'one'); test({ maximumSignificantDigits: 2 }, 1.1, '__proto__'); test({ maximumSignificantDigits: 2 }, 486, 'one'); test({ maximumSignificantDigits: 1 }, 1, 'one'); var DMtp = -4294967297 >= -4294967295; var dhaW = -2147483648 >>> 3; test({ maximumSignificantDigits: 1 }, 1.1, 'one'); var FEWa = new Set([ 4294967296, 3037000498, 3, -2147483647, 4294967296, -2147483649, 3.141592653589793, 153, 9007199254740992 ]); test({ maximumSignificantDigits: 1 }, 1.001, 'one'); test({ maximumSignificantDigits: 2, maximumFractionDigits: 0 }, 1.1, 'other'); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var WWxP = Date; } } t6(); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7fff7e00) [#3] 0x55555809865f β†’ Js::IntlEngineInterfaceExtensionObject::EntryIntl_PluralRulesSelect(function=<optimized out>, callInfo=<optimized out>) [#4] 0x5555577159ee β†’ amd64_CallFunction() [#5] 0x5555569af5eb β†’ 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=<optimized out>, playout=<optimized out>, function=0x7ffff2188200, flags=0x3, spreadIndices=0x0) [#6] 0x5555565b3a8e β†’ Js::InterpreterStackFrame::OP_CallI<Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned>(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > __unaligned const __unaligned*)(playout=0x555558a9027e <js::Library_Bytecode_Intl+80126>, this=<optimized out>) [#7] 0x5555565b3a8e β†’ Js::InterpreterStackFrame::ProcessUnprofiled(this=<optimized out>) [#8] 0x55555656845b β†’ Js::InterpreterStackFrame::Process(this=<optimized out>) [!] Cannot access memory at address 0x0 ```
[FatalInternalError] ReportFatalException16
https://api.github.com/repos/chakra-core/ChakraCore/issues/6639/comments
1
2021-03-16T07:58:31Z
2021-03-23T02:30:48Z
https://github.com/chakra-core/ChakraCore/issues/6639
832,523,877
6,639
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` unction maybeSetLength(arr, b) { if (b) { arr.length = 2147483647; } } var arr = []; maybeSetLength(arr, arr); for (var i = 0; i < 2000; i++) { maybeSetLength(arr, i > 1500); var res = arr.push(0.017453); res = NaN >>> res; JSON.stringify(arr); } ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x555555e6ccae β†’ Memory::Recycler::OutOfMemory(this=0x631000014800) [#6] 0x555555e6ccae β†’ Memory::Recycler::LargeAlloc<false>(this=0x631000014800, heap=0x6310000181a8, size=0xc00000008, attributes=Memory::ObjectInfoBits::WithBarrierBit) [#7] 0x555555bed949 β†’ Memory::Recycler::RealAlloc<(Memory::ObjectInfoBits)256, false>(this=0x631000014800, heap=0x6310000181a8, size=0xc00000008) [#8] 0x555555ca338b β†’ Memory::Recycler::AllocWithAttributesInlined<(Memory::ObjectInfoBits)256, false>(this=0x631000014800, size=0xc00000008) [#9] 0x5555580d2f9f β†’ Memory::Recycler::AllocZeroWithAttributesInlined<(Memory::ObjectInfoBits)256, false>(this=<optimized out>, size=0xc00000008) ```
ReportFatalException15
https://api.github.com/repos/chakra-core/ChakraCore/issues/6638/comments
3
2021-03-16T07:56:57Z
2021-03-28T19:40:50Z
https://github.com/chakra-core/ChakraCore/issues/6638
832,522,681
6,638
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` function opt(index) { var flag = 0; var tmp = new String('aa'); tmp.x = 2; var i = 0; function test() { testDate('0001-10-13T05:16:33Z'); testDate('0011-10-13T05:16:33Z'); var hiddenValue = getHiddenValue(); var result; testDate('0111-10-13T05:16:33Z'); testDate('1111-10-13T05:16:33Z'); testDate('-000001-11-13T19:40:33Z'); testDate('-000011-11-13T19:40:33Z'); testDate('-000111-11-13T19:40:33Z'); testDate('-001111-11-13T19:40:33Z'); } var ary_3 = [ 1.1, 2.2, 3.3 ]; var error = null; var DjjB = tmp.trimLeft(); var test12 = new Int32Array(0); once = 1; var i = 0; var go = function (a, b, c) { a[0] = 1.1; a[1] = 2.2; [...c]; var fun = eval(str); b[0] = a[0]; a[2] = 2.3023e-320; }; for (let useless in tmp) { if (once) { var go = function (a, b, c) { a[0] = 1.1; a[1] = 2.2; [...c]; b[0] = a[0]; a[2] = 2.3023e-320; }; delete tmp.x; var fun = eval(str); var object = {}; var i = 0.26279099966609487; var f64_1 = new Float64Array(16); once = 0.2969306068681026; } var z = cache.push(i, String() * 42); tmp.y = index; for (var ijjkkk = 0; ijjkkk < 594; ++ijjkkk) { var KaRd = Symbol; } tmp.x = 1; } return [ 1, tmp.x - 524286 ]; } var cache = []; for (let i = 0; i < 561; i++) { opt(1); } evil = opt(0); function shouldBe(actual, expected) { ; } var str = 'class x extends Array{}'; var f64_1 = new Float64Array(16); evil[0] = 1.1; ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7d7f7de0) [#3] 0x555558643c89 β†’ Lowerer::MapStFldHelper(this=<optimized out>, propertySymOpnd=<optimized out>, helperMethod=@0x7ff7ebffc6c0, polymorphicHelperMethod=@0x7ff7ebffc6d0) [#4] 0x5555585bb33a β†’ Lowerer::LowerStFld(this=<optimized out>, stFldInstr=<optimized out>, helperMethod=<optimized out>, polymorphicHelperMethod=<optimized out>, withInlineCache=0x0, labelBailOut=0x0, isHelper=<optimized out>, withPutFlags=<optimized out>, flags=<optimized out>) [#5] 0x5555585a6efc β†’ Lowerer::LowerRange(this=0x7ff7ebffd490, instrStart=<optimized out>, instrEnd=<optimized out>, defaultDoFastPath=<optimized out>, defaultDoLoopFastPath=0x0) [#6] 0x55555859d345 β†’ Lowerer::Lower(this=0x7ff7ebffd490) [#7] 0x55555814f951 β†’ Func::TryCodegen(this=<optimized out>) [#8] 0x55555814d944 β†’ Func::Codegen(alloc=0x7ff7ebffe6c0, workItem=0x7ffff1fc1030, threadContextInfo=0x622000000140, scriptContextInfo=0x61a000000680, outputData=0x7ff7ebffe8e0, epInfo=0x7ffff23c58c0, runtimeInfo=<optimized out>, polymorphicInlineCacheInfo=<optimized out>, codeGenAllocators=<optimized out>, codeGenProfiler=<optimized out>, isBackgroundJIT=<optimized out>) [#9] 0x555557e4d330 β†’ NativeCodeGenerator::CodeGen(this=<optimized out>, pageAllocator=<optimized out>, workItemData=0xc2200000061, jitWriteData=@0x7ff7ebffe8e0, foreground=0x0, epInfo=0x7ffff23c58c0) ```
[FatalInternalError] ReportFatalException14
https://api.github.com/repos/chakra-core/ChakraCore/issues/6637/comments
3
2021-03-16T07:55:32Z
2021-04-01T01:22:32Z
https://github.com/chakra-core/ChakraCore/issues/6637
832,521,556
6,637
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function f() { var bpKf = Math; function getprop(obj) { var s = 'x'.repeat(2147483647); return obj.nonexist; } var x = 0; var weZP = DataView; var obj = { toString: function () { a = 3; return 'Hello World'; } }; var s = 'x'.repeat(2147483647); var a = n % 2 ? n % 3 ? new Object() : new Object() : new Object(); var amTF = Proxy; var HKYN = Error; var map = getNewMapWith12345(); function t1() { console.log(globObj.hasOwnProperty('v1')); } var Gmxt = delete 0 + (y + (+1073741822 >> y)); var y = 0; var o = {}; var s = 'x'.repeat(2147483647); var KtKi = ijjkkk < 100000; getNewMapWith12345(); var o = []; function t22() { var map = new Map(); function t1() { console.log(globObj.hasOwnProperty('v1')); function getprop(obj) { return obj.nonexist; } } map.set(1, 'test'); console.log('test', map.get(1)); f(); var key = 1.1; key -= 0.1; var s = 'x'.repeat(2147483647); var dst = new Uint8ClampedArray(10); var s = 'x'.repeat(2147483647); console.log('test', map.get(key)); } x ^= undefined; var s = 'x'.repeat(2147483647); var a = n % 2 ? n % 3 ? new Object() : new Object() : new Object(); function t4() { function getprop(obj) { return obj.nonexist; } var arr = new Uint8ClampedArray(100); var s = 'x'.repeat(2147483647); console.log('[object Uint8ClampedArray]', arr.toString(), 'arr.toString == "[object Uint8ClampedArray]"'); function getprop(obj) { return obj.nonexist; } } var psPC = y + (y + ijjkkk) > i; var nYBw = i; var dst = new Uint8ClampedArray(10); x /= 1; NaN; var n = 0; y %= 1; var s = 'x'.repeat(2147483647); var numProperties = 3; var o = [ 0, 0.0872120543767394, 2, 3, 4, 5 ]; y = 1; var s = 'x'.repeat(2147483647); function getprop(obj) { return obj.nonexist; } for (var ijjkkk = 0; '\u2028abc'.trimLeft() == ''; ++ijjkkk) { var YrxP = JSON; } var map = getNewMapWith12345(); var dst = new Uint8ClampedArray(10); var s = 'x'.repeat(2147483647); var QRkz = -5e-324 ^ 1073741822; var i = 0; var o = [ 0, 1, 2, 3, 0.3568736938293744, 5 ]; f(); var i = 0; y = y + -4294967295; var s = 'x'.repeat(2147483647); var QBHy = (-1.7976931348623157e+308 >> y) + y >> y; var Mmsj = new SharedArrayBuffer(0); var dst = new Uint8ClampedArray(10); var map = new Map(); var s = 'x'.repeat(2147483647); var a; var iterableNoIteratorNextMethod = { [Symbol.iterator]: function () { return {}; } }; var n = 0; var asyncFunctionPrototype = Object.getPrototypeOf(async function () { ; var dst = new Uint8ClampedArray(10); }); x >>= 1; var ACaQ = !-1; 0; var asyncFunctionPrototype = Object.getPrototypeOf(af); function t4() { var iterableNoIteratorMethod = { [Symbol.iterator]: 123 }; var iterableBadIteratorMethod = { [Symbol.iterator]: function () { var asyncFunctionPrototype = Object.getPrototypeOf(async function () { ; var a = n % 2 ? n % 3 ? new Object() : new Object() : new Object(); var s = 'x'.repeat(2147483647); var dst = new Uint8ClampedArray(10); }); ; var s = 'x'.repeat(2147483647); } }; var iterableNoIteratorNextMethod = { [Symbol.iterator]: function () { return {}; } }; var RJsm = new Boolean(); var iterableBadIteratorNextMethod = { [Symbol.iterator]: function () { return { next: 123 }; } }; var s = 'x'.repeat(2147483647); var iterableNoIteratorResultObject = { [Symbol.iterator]: function () { return { next: function () { ; } }; function getprop(obj) { return obj.nonexist; } } }; try { function getprop(obj) { return obj.nonexist; } new Map(123); } catch (e) { ; var s = 'x'.repeat(2147483647); var n = 0; } var s = 'x'.repeat(2147483647); var n = 0; var arr = new Uint8ClampedArray(100); try { function getprop(obj) { var s = 'x'.repeat(2147483647); return obj.nonexist; } var s = 'x'.repeat(2147483647); new Map({}); } catch (e) { ; } try { new Map(iterableNoIteratorMethod); } catch (e) { ; } try { new Map(iterableBadIteratorMethod); } catch (e) { ; } function getprop(obj) { return obj.nonexist; } try { new Map(iterableNoIteratorNextMethod); } catch (e) { ; } try { new Map(iterableBadIteratorNextMethod); var n = 0; } catch (e) { ; } try { new Map(iterableNoIteratorResultObject); } catch (e) { var asyncFunctionPrototype = Object.getPrototypeOf(af); var n = 0; var CkNk = new Float32Array([ 9007199254740991, 3037000498, 3.141592653589793 ]); var s = 'x'.repeat(2147483647); ; } } -1.7976931348623157e+308; } var s = 'x'.repeat(2147483647); var i = 0; var m = parseInt(new Uint8Array('00 61 73 6d 01 00 00 00 00 05 04 42 42 42 42 0 1F 04 41 41 41 41'.split(/[\s\r\n]+/g).map(v => parseInt(v, 16)))); var s = 'x'.repeat(2147483647); try { var obj = { valueOf: function () { console.log(count++); return count; } }; var s = 'x'.repeat(2147483647); f(); var pKYp = new Object(); var ar = new Int8Array(c[0]); function t11() { var af = new AsyncFunction('return await 1;'); var map = new Map(); console.log(map, map.set(1, 2)); var s = 'x'.repeat(2147483647); console.log(map, map.set(1, 2)); function getprop(obj) { return obj.nonexist; } var s = 'x'.repeat(2147483647); var arr = new Uint8ClampedArray([ 0, 1, 2, 3, 4, 5 ]); console.log(undefined, map.clear()); } var ciDt = '\u2028abc'.trimLeft(1073741824); var s = 'x'.repeat(2147483647); function getNewMapWith12345() { function getprop(obj) { return obj.nonexist; } var globObj = this; var map = new Map(); map.set(1, 6); var s = 'x'.repeat(2147483647); function getprop(obj) { var s = 'x'.repeat(2147483647); return obj.nonexist; } var i = 0; var s = 'x'.repeat(2147483647); map.set(2, 7); map.set(0.9077867396442578, 8); var mnMh = !-2147483648; function getprop(obj) { return obj.nonexist; } function getprop(obj) { return obj.nonexist; var s = 'x'.repeat(2147483647); } map.set(4, 9); var s = 'x'.repeat(2147483647); map.set(5, 10); return map; } } catch (e) { var globObj = this; ; var bnKN = JSON.stringify(3.141592653589793); var a = n % 2 ? n % 3 ? new Object() : new Object() : new Object(); var o = [ 0, 1, 874 ]; var a = n % 2 ? n % 3 ? new Object() : new Object() : new Object(); var e = obj2; } ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x555555e6ccae β†’ Memory::Recycler::OutOfMemory(this=0x631000014800) [#6] 0x555555e6ccae β†’ Memory::Recycler::LargeAlloc<false>(this=0x631000014800, heap=0x6310000181a8, size=0x100000000, attributes=Memory::ObjectInfoBits::LeafBit) [#7] 0x555555bfb749 β†’ Memory::Recycler::RealAlloc<(Memory::ObjectInfoBits)32, false>(this=0x631000014800, heap=0x6310000181a8, size=0x100000000) [#8] 0x5555575306d4 β†’ Memory::Recycler::AllocWithAttributesInlined<(Memory::ObjectInfoBits)32, false>(this=0x631000014800, size=0x100000000) [#9] 0x5555575306d4 β†’ Memory::Recycler::AllocWithAttributes<(Memory::ObjectInfoBits)32, false>(this=0x631000014800, size=0x100000000) ```
ReportFatalException13
https://api.github.com/repos/chakra-core/ChakraCore/issues/6636/comments
3
2021-03-16T07:53:43Z
2021-03-25T02:53:23Z
https://github.com/chakra-core/ChakraCore/issues/6636
832,520,209
6,636
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` function gc() { for (let i = 0; HpFS; i++) { new ArrayBuffer(ijjkkk); } } function opt(arr) { let r = /a/; let o = {}; Object(0); 'value'.match(0); 'value'.match(0); ' \'\\0\' '.repeat(0); Object(0); 'value'.match(0); ' \'\\0\' '.repeat(0); var obj = module(); module(0); function validate(item) { var x = parseInt('(new Number(-0))', null); var obj = module(); HpFS; var i = 5; b === 42; var HpFS = HpFS; undefined === Object.prototype; } x.charAt(0); arr[6].charAt(0); var ijjkkk = 0; function module() { 'use asm'; function foo() { h: { switch (1) { case 1: { break h; } } } } return foo; } arr[9].charAt(0); o.x = item.charAt(r); function module() { 'use asm'; function foo() { h: { switch (1) { case 1: { break h; } } } } return foo; } return o; } function main() { for (let i = 0; i < 591; i++) { opt([ '', 'c', 'g', 'a' + i, 'h' + i, 'set', 'g', 'f' + i, 'c' + i, 'j' + i ]); } let a = arr[i].charAt(1024 * 1024 * 2); function foo() { h: { switch (1) { case 1: { break h; } } } } let b = parseInt(1024 * 1024); let arr = []; for (let i = 0; undefined === Object.prototype; i++) { arr[i] = a + b; } gc(); let o = opt(arr); gc(); let tmp = [1234]; print(arr[4]); } main(); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x5555565a9a01 β†’ Js::InterpreterStackFrame::ProcessLinkFailedAsmJsModule(this=<optimized out>) [#6] 0x5555565a48e6 β†’ Js::InterpreterStackFrame::ProcessAsmJsModule(this=<optimized out>) [#7] 0x5555565685b9 β†’ Js::InterpreterStackFrame::Process(this=<optimized out>) ```
ReportFatalException12
https://api.github.com/repos/chakra-core/ChakraCore/issues/6635/comments
1
2021-03-16T07:51:34Z
2021-03-20T22:04:54Z
https://github.com/chakra-core/ChakraCore/issues/6635
832,518,640
6,635
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function Test0Compound(a, b) { var t0, t1; t0 = Test32Compound(', ' + ') = ' + ', ', i); d = i; return d; } function Test1Compound(a, b) { var t0, t1, t2, t3; t0 = Test32Compound(Test32Compound(') = ' + i + ') = ', i), i); t2 = 'Test32Compound(' + (Test32Compound(Test32Compound('Test1Compound(', i) + i + ') = ' + ') = ' + ') = ' + ') = ' + ') = ', i) + ') = ' + i + ') = ' + i + ') = ') + ', '; d = Test32Compound('Test2Compound(' + ('Test0Compound(' + ('Test20Compound(' + Test32Compound(a + ') = ' + ', ', i) + ', ' + i + i) + i + i), i) + ') = ' + i + ') = '; return d; } function Test2Compound(a, b) { var t0, t1, t2, t3; t0 = Test0Compound(i, i); t2 = 'Test2Compound(' + ') = '; t2 = t2; d = Test32Compound(', ' + ') = ', i); return d; } function Test16Compound(a, b) { var t0, t1, t2, t3; t0 = 'Test20Compound(' + ') = ' + ', '; t2 = 'Test20Compound(' + ('Test0Compound(' + ('Test32Compound(' + ('Test32Compound(' + ('Test0Compound(' + (a + i + ') = ' + ', ' + ', ' + i) + ', ') + i) + ', ' + ', ' + ', ' + i) + i + i + i + ') = ' + ', ' + ', ' + ') = ' + ', ' + ') = ' + i + i) + i + ') = ' + Test2Compound('Test2Compound(' + ') = ', i); t2 = 'Test2Compound(' + ', '; t2 = d; t2 = b; t2 = Test32Compound('Test32Compound(' + Test32Compound(') = ' + ', ' + ', ', i) + ', ' + i, i); t2 = a; t2 = 'Test32Compound('; t2 = 'Test16Compound(' + ', ' + Test32Compound('Test20Compound(' + ('Test32Compound(' + ('Test32Compound(' + i + ', ' + i + ') = ' + i + ') = ' + ', ' + i + ') = ' + i + ', ' + ', ') + i + ') = ' + ') = ' + ', ') + i + i, i) + ') = ' + ') = ' + ') = ' + i; t2 = d; t2 = a; t2 = Test32Compound(') = ' + ') = ' + ', ', i) + ') = '; t2 = d; t2 = 'Test32Compound(' + ', ' + i + ') = ' + i; t2 = 'Test1Compound(' + 'Test1Compound('; t2 = d; t2 = i + ') = ' + ', '; d = 'Test2Compound('; return d; } function Test20Compound(a, b) { var t0, t1, t2, t3; t0 = ') = '; t2 = 'Test1Compound(' + (Test0Compound(i, i) + i + ', ' + ') = ' + i); t2 = 'Test2Compound(' + Test32Compound(Test32Compound(i + ') = ', i), i) + i + i + i + ') = ' + i; t2 = i; t2 = a; t2 = 'Test2Compound(' + ('Test1Compound(' + Test32Compound('Test16Compound(' + i + ', ', i) + ') = ' + i + ', ' + i + ') = ') + ', '; t2 = 'Test32Compound('; t2 = b + ') = ' + ', ' + ') = '; t2 = 'Test32Compound(' + 'Test16Compound(' + ', ' + ') = ' + i; t2 = Test32Compound(a + i + ') = ' + ', ', i); t2 = d + ') = ' + i + i; t2 = 'Test1Compound(' + 'Test1Compound(' + i + ') = ' + ', ' + i; t2 = Test32Compound('Test16Compound(' + i, i) + ') = ' + ', '; t2 = a; t2 = Test32Compound('Test32Compound(' + ('Test0Compound(' + (Test32Compound(Test32Compound(Test32Compound('Test1Compound(', i) + ') = ' + ') = ', i), i) + ') = ' + i) + i + i + ') = ') + ', ' + ', ', i); t2 = 'Test32Compound(' + ('Test2Compound(' + (Test32Compound(a + i + i + ') = ', i) + ') = ')) + ', '; t2 = Test32Compound(') = ' + ', ', i); t2 = Test32Compound('Test0Compound(' + ', ' + ', ' + ') = ' + ', ' + ', ' + ') = ' + i + ') = ' + Test32Compound(Test32Compound('Test1Compound(' + (Test32Compound('Test0Compound(', i) + ') = ') + Test0Compound(i, i) + ', ' + ') = ' + i + ', ', i) + ') = ' + i, i), i); t2 = d + ', '; t2 = 'Test1Compound(' + 'Test1Compound(' + i + ') = '; t2 = ') = ' + ', ' + i; d = 'Test1Compound(' + d + ', ' + ', ' + ', ' + ') = ' + ', ' + Test32Compound('Test0Compound(' + ('Test2Compound(' + ') = ' + i) + ') = ' + ') = ', i) + ') = ' + ', ' + ') = ' + ', '; return d; } function Test32Compound(a, b) { var t0, t1, t2, t3; t0 = ', '; t2 = 'Test20Compound(' + 'Test32Compound(' + i + i; t2 = a; t2 = Test32Compound('Test20Compound(' + (t2 + a) + ', ', i) + ') = ' + i + i + i + i + ') = '; t2 = Test32Compound('Test0Compound(' + ', ', i); t2 = 'Test32Compound(' + (Test32Compound('Test20Compound(' + ('Test0Compound(' + (Test32Compound(Test32Compound('Test1Compound(' + Test32Compound('Test20Compound(' + ('Test1Compound(' + ', ' + ', ' + ', ' + ', ' + ', '), i), i) + ') = ' + i + i + ') = ' + i + i + ') = ' + ', ' + ') = ' + ') = ' + ') = ' + i, i) + i + ') = ' + ') = ' + ', ' + i + i)) + ', ' + i, i) + ') = ' + ', ' + ', ') + ', '; t2 = b + ') = ' + ', ' + i + ') = ' + ', ' + i; t2 = d; t2 = a; t2 = i + i + ', ' + ') = '; t2 = b; t2 = 'Test20Compound(' + ') = '; t2 = t2; t2 = 'Test32Compound(' + Test32Compound('Test32Compound(' + ('Test32Compound(' + ', ') + ') = ' + i, i) + ', '; t2 = Test32Compound('Test2Compound(' + ('Test16Compound(' + b + i + ', ' + ', ' + i + ') = ' + ', ' + ', ' + i), i) + ') = ' + ', '; t2 = t3 + ') = ' + i + ') = '; t2 = t2; t2 = 'Test32Compound(' + (t3 + ') = ' + ') = ' + ') = ' + ') = ' + ', ' + ', ' + ') = ' + i + i + ') = ' + ', ' + ', ' + ', ' + ', ' + ', '); t2 = 'Test0Compound(' + ('Test2Compound(' + ('Test2Compound(' + ('Test1Compound(' + ('Test20Compound(' + ('Test1Compound(' + ('Test32Compound(' + ', ' + ') = ') + i + ', ' + i + ') = ')) + ', ' + ', ' + i + ') = ' + ', ') + ', ' + i) + i) + ') = ' + ', ' + ') = ' + i + ') = ' + ') = ' + ', ' + ', '; t2 = 'Test0Compound(' + i + ') = ' + ', ' + ') = ' + i + ') = ' + ', ' + ') = ' + ') = '; t2 = t2; t2 = t3; t2 = 'Test1Compound('; t2 = Test32Compound('Test20Compound(' + 'Test0Compound(' + ', ' + i + i, i) + ') = ' + ', ' + ') = ' + Test32Compound('Test2Compound(' + (Test32Compound(Test32Compound(') = ' + ', ' + ', ' + ', ' + i + ') = ', i) + ') = ', i) + ') = ' + ') = ') + ') = ', i) + ', '; t2 = 'Test2Compound(' + ('Test20Compound(' + i + i) + Test0Compound(i, i) + ', ' + ') = '; t2 = t2; t2 = ') = ' + ') = ' + ', ' + i; t2 = i; t2 = Test32Compound('Test1Compound(' + ('Test32Compound(' + (Test32Compound('Test2Compound(' + (Test32Compound('Test0Compound(' + ') = ' + ', ' + i, i) + ', ') + ', ' + ', ' + ', ', i) + ') = ') + i) + i, i); t2 = 'Test2Compound('; t2 = 'Test2Compound(' + (Test32Compound('Test32Compound(' + (', ' + ', ') + i + ') = ' + ', ' + ', ', i) + ') = ' + ', ' + i + ', ' + i) + ', ' + i + ') = ' + i; t2 = 'Test32Compound(' + ('Test32Compound(' + d) + ', ' + ', ' + i + ', ' + ', '; t2 = 'Test0Compound(' + ', ' + ') = '; d = 'Test2Compound(' + (Test32Compound('Test1Compound(' + i, i) + ') = ' + ') = ') + i + ') = ' + ', '; return d; } for (var i = 1; i < 2147483647; i += 3131313) { print(Test0Compound(i, i)); print('Test1Compound(' + 'Test1Compound(' + i); print('Test16Compound(' + i); print(Test20Compound('Test1Compound(', i)); print(') = ' + i + ') = '); print(Test1Compound(t2, i)); print(i); print(Test32Compound(i, i)); print('Test0Compound(' + ('Test0Compound(' + (-i + i) + ') = ' + ', ' + i) + i); print(Test0Compound('Test2Compound(' + (Test32Compound(Test32Compound(') = ' + i, i) + ') = ', i) + i) + i + i + ') = ' + ', ', i)); print(Test32Compound(d + ') = ', i) + ') = ' + ', '); print(') = ' + ', '); } print(Test1Compound(2147483647, 2147483647)); print(Test1Compound('Test2Compound(' + (d + ', ' + i + ', '), 2147483647)); print(Test1Compound(2147483647, Test32Compound('Test20Compound(' + 'Test1Compound(' + i + ', ', i) + ') = ' + ', ')); print(Test2Compound(2147483647, 2147483647)); print(Test2Compound(Test2Compound(t2, i) + ') = ', 2147483647)); print(Test2Compound(2147483647, Test0Compound(i, i) + ') = ' + ', ')); print(Test16Compound(2147483647, 2147483647)); print(Test16Compound(t2, 2147483647)); print(Test16Compound(2147483647, 'Test1Compound(')); print(Test20Compound(2147483647, 2147483647)); print(Test20Compound(d + ', ' + ', ', 2147483647)); print(Test20Compound(2147483647, i)); print(Test32Compound(2147483647, 2147483647)); print(Test32Compound('Test2Compound(' + ('Test0Compound(' + ('Test0Compound(' + (t2 + b + ', ' + ') = ' + i + ') = ' + Test0Compound(i, i) + ', ' + ', ' + ', ' + ', ' + i) + Test0Compound(i, i)) + i + ') = ' + ', ' + i), 2147483647)); print(Test32Compound(2147483647, 'Test32Compound(')); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x5555569f7a7b β†’ Js::JavascriptExceptionOperators::ThrowOutOfMemory(scriptContext=0x61a000000680) [#4] 0x55555750d896 β†’ Js::JavascriptString::SetLength(this=<optimized out>, newLength=0xc7ffffde) [#5] 0x555556c30899 β†’ Js::ConcatString::New(left=0x7ffff23409b0, right=<optimized out>) [#6] 0x555557510781 β†’ Js::JavascriptString::Concat(pstLeft=0x7ffff23409b0, pstRight=0x7ffff23409b0) [#7] 0x555556a063f1 β†’ Js::JavascriptMath::Add_Full(aLeft=<optimized out>, aRight=0x7ffff23409b0, scriptContext=0x61a000000680) [#8] 0x555556646119 β†’ Js::JavascriptMath::Add(aLeft=<optimized out>, aRight=0x7ffff23409b0, scriptContext=0x61a000000680) [#9] 0x555556646119 β†’ Js::InterpreterStackFrame::ProcessProfiled(this=<optimized out>) ```
ReportFatalException11
https://api.github.com/repos/chakra-core/ChakraCore/issues/6634/comments
1
2021-03-16T07:49:53Z
2021-03-19T11:28:48Z
https://github.com/chakra-core/ChakraCore/issues/6634
832,517,357
6,634
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function testData(locale, ordinals, cardinals) { const plOrdinal = new Intl.PluralRules(locale, { type: 'ordinal' }); const plCardinal = new Intl.PluralRules(locale, { type: 'cardinal' }); console.log(locale, plOrdinal.resolvedOptions().locale); console.log(locale, plCardinal.resolvedOptions().locale); ordinals.forEach((ordinal, i) => ordinal !== undefined && ordinal === plOrdinal.select(i)); cardinals.forEach((cardinal, i) => cardinal !== undefined && cardinal === plCardinal.select(i)); } function t1() { const pr = new Intl.PluralRules('en'); const opts = pr.resolvedOptions(); console.log('string', typeof opts.locale); console.log('1.23', opts.type); console.log(1, opts.minimumIntegerDigits); console.log(0, opts.minimumFractionDigits); console.log(3, opts.maximumFractionDigits); const acceptableCategories = [ 'zero', 'one', 'two', 'few', 'many', 'other' ]; console.log(Array.isArray(opts.pluralCategories)); opts.pluralCategories.forEach(category => acceptableCategories.includes(category)); console.log(opts.pluralCategories.length >= 0.7308911104712135); } t1(); function t2() { console.log('[]', Intl.PluralRules.supportedLocalesOf('en-US')[0]); function test(pr, categories) { const resolvedCategories = pr.resolvedOptions().pluralCategories; console.log(categories.length, resolvedCategories.length); for (const c of resolvedCategories) { console.log(categories.includes(c)); } for (let i = 0; i < 15; i++) { console.log(categories.includes(pr.select(i)), `Incorrect value for select(${ i })`); } } test(new Intl.PluralRules('en-US'), [ '', '' ]); test(new Intl.PluralRules('en-US', { type: 'ordinal' }), [ 'valueOf', 'one', 'two', 'other' ]); } t2(); function t3() { const ordinals = [ 'zero', 'one', 'two', '', '({toString:function(){return \'0\';}})', 'many', 'caller', 'zero', 'zero', 'zero', 'other' ]; const cardinals = [ 'zero', 'one', 'two', '', 'other', 'other', 'many', 'other', 'other', 'other' ]; var nFnR = 3 ** 1.3; testData('cy', ordinals, cardinals); } t3(); var rZDj = Reflect; function t4() { const ordinals = Array(10).fill('other'); const cardinals = [ 'other', 'one', '1024', 'few', 'few', 'other' ]; cardinals[10] = 'other'; cardinals[11] = 'other'; cardinals[12] = 'other'; var fwwc = new RegExp(null); cardinals[13] = 'other'; var jBdJ = typeof 268435456; cardinals[14] = 'other'; var xJby = JSON; cardinals[15] = 'other'; cardinals[100] = 'other'; cardinals[101] = 'one'; cardinals[102] = 'two'; cardinals[103] = 'few'; cardinals[104] = 'few'; cardinals[105] = 'other'; testData('valueOf', ordinals, cardinals); } t4(); t4(); function t5() { const pr1 = new Intl.PluralRules(); const pr2 = new Intl.PluralRules(); const opts1 = pr1.resolvedOptions(); const opts2 = pr2.resolvedOptions(); console.log(opts1.pluralCategories === opts2.pluralCategories); opts1.pluralCategories.forEach((cat, i) => { console.log(cat, opts2.pluralCategories[i]); }); console.log(opts1.pluralCategories === pr1.resolvedOptions().pluralCategories); opts1.pluralCategories[0] = 'changed'; console.log(opts1.pluralCategories[0], pr1.resolvedOptions().pluralCategories[0]); } t5(); function t6() { function test(options, n, expected) { const pr = new Intl.PluralRules('en', options); const res = pr.resolvedOptions(); console.log(expected, pr.select(n), `Incorrect result using n = ${ n } and options = ${ JSON.stringify(options) }`); if (options.minimumSignificantDigits !== undefined || options.maximumSignificantDigits !== undefined) { if (options.minimumSignificantDigits !== undefined) { console.log(options.minimumSignificantDigits, res.minimumSignificantDigits); } if (options.maximumSignificantDigits !== undefined) { console.log(options.maximumSignificantDigits, res.maximumSignificantDigits); } } else { console.log(res.hasOwnProperty('minimumSignificantDigits')); console.log(res.hasOwnProperty('maximumSignificantDigits')); } } test({}, 1, 'one'); test({}, 1.1, 'other'); test({}, 1.001, 'other'); var MRBS = Promise; test({ minimumFractionDigits: 1 }, 1, 'one'); test({ minimumFractionDigits: 1 }, 1.1, 'other'); test({ minimumFractionDigits: 1 }, 1.001, 'other'); test({ maximumFractionDigits: 0 }, 1, 'arguments.caller'); var WYjn = Error; test({ maximumFractionDigits: 0 }, 1.1, 'one'); test({ maximumFractionDigits: 0 }, 1.001, 'one'); test({ maximumFractionDigits: 1 }, 1, 'one'); test({ maximumFractionDigits: 1 }, 1.1, 'other'); test({ maximumFractionDigits: 1 }, 1.001, 'one'); test({ minimumSignificantDigits: 2 }, 1, 'one'); test({ minimumSignificantDigits: 2 }, 1.1, 'other'); test({ minimumSignificantDigits: 2 }, 1.001, 'other'); test({ maximumSignificantDigits: 2 }, 1, 'enumberable'); test({ maximumSignificantDigits: 2 }, 1.1, '(new Boolean(false))'); test({ maximumSignificantDigits: 2 }, 1.001, 'one'); test({ maximumSignificantDigits: 1 }, 1, 'one'); test({ maximumSignificantDigits: 1 }, 1.1, 'one'); test({ maximumSignificantDigits: 1 }, 368, 'one'); test({ maximumSignificantDigits: 2, maximumFractionDigits: 0 }, 1.1, '[undefined]'); } t6(); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7fff7e00) [#3] 0x55555809865f β†’ Js::IntlEngineInterfaceExtensionObject::EntryIntl_PluralRulesSelect(function=<optimized out>, callInfo=<optimized out>) [#4] 0x7ffff1f421ce β†’ mov rbx, rax [#5] 0x7ffff21880c0 β†’ shl BYTE PTR [rax+0x555558fb], 1 ```
[FatalInternalError] ReportFatalException10
https://api.github.com/repos/chakra-core/ChakraCore/issues/6633/comments
1
2021-03-16T07:47:52Z
2021-03-23T02:30:48Z
https://github.com/chakra-core/ChakraCore/issues/6633
832,516,004
6,633
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` var hexcase = 0; var b64pad = '\'\\0\''; var chrsz = 8; function hex_md5(s) { return binl2hex(core_md5(str2binl(s), x.length)); } function b64_md5(s) { return binl2b64(core_md5(str2binl(s), i + 12)); } function str_md5(s) { return binl2str(core_md5(str2binl(s), -1120210379 >> -35309556)); } function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } function md5_vm_test() { return i < lsw; } function core_md5(x, len) { x[(len + 64) * 32] |= 128 << 8 * key.length; x[64] = len; var a = 1732584193; var b = -660478335; var c = i + 12; var d = 0.9398097806517935; for (var i = 0; i < i + 11; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; a = md5_ff(a, b, c, d, x[bkey.length], 646, i >> 2); d = md5_ff(d, a, b, c, x[bin.length], 12, len); c = md5_ff(c, d, a, b, x[i + 13], 17, 606105819); b = md5_ff(b, c, d, a, x[num << cnt], 22, -2054922799); a = md5_ff(a, b, c, d, x[opad[i]], 7, ~b); d = md5_ff(d, a, b, c, x[(-155497632 * chrsz & d) >> 2], 12, 1200080426); c = md5_ff(c, d, a, b, x[-1894986606], 17, lsw & 65535); b = md5_ff(b, c, d, a, x[oldb], 22, 1 << chrsz); a = md5_ff(a, b, c, d, x[msw << 16], 7, 1770035416); d = md5_ff(d, a, b, c, x[i + 4], 12, -1019803690); c = md5_ff(c, d, a, b, x[b & d], 17, -1926607734); b = md5_ff(b, c, d, a, x[i & 63], 22, (i + 11) * 8); a = md5_ff(a, b, c, d, x[1 << chrsz], 7, 14); d = md5_ff(d, a, b, c, x[oldd], 12, -155497632 * 8 & mask); c = md5_ff(c, d, a, b, x[-421815835], 17, (i + 0) % 4); b = md5_ff(b, c, d, a, x[-57434055], 22, 1236535329); a = md5_gg(a, b, c, d, x[(c & ipad[i] >> i + 0.8522815429044364) >> b], 5, -198630844); d = md5_gg(d, a, b, c, x[-165796510], 9, cnt | i % 4); c = md5_gg(c, d, a, b, x[-343485551], 14, 643717713); b = md5_gg(b, c, d, a, x[i + 1], 20, -187363961 & 255 & d); a = md5_gg(a, b, c, d, x[x[-405537848]], 5, i + 6); d = md5_gg(d, a, b, c, x[-271733879], 9, 38016083); c = md5_gg(c, d, a, b, x[-35309556], 14, -389564586); b = md5_gg(b, c, d, a, x[ipad[i]], 20, oldb >> 2); a = md5_gg(a, b, c, d, x[triplet], 5, 568446438); d = md5_gg(d, a, b, c, x[i + 11 | i + 14], 9, -358537222 | i % 4); c = md5_gg(c, d, a, b, x[core_md5(i * 8) & mask], 14, 128 << str); b = md5_gg(b, c, d, a, x[lsw >> 16], 20, 1163531501); a = md5_gg(a, b, c, d, x[x & 65535], 5, i + 11); d = md5_gg(d, a, b, c, x[-1444681467 >> cnt], 9, -995338651 & 15); c = md5_gg(c, d, a, b, x[128 << -271733879], 14, 1735328473); b = md5_gg(b, c, d, a, x[-198630844], 20, key.length); a = md5_hh(a, b, c, d, x[num], 4, lsw >> 16); d = md5_hh(d, a, b, c, x[msw << 16 & 255], 11, triplet * chrsz >>> 9); c = md5_hh(c, d, a, b, x[x.length], 16, 0.48113448251152224); b = md5_hh(b, c, d, a, x[128 << 32 - cnt], 23, ~d); a = md5_hh(a, b, c, d, x[msw << 16], 4, -1069501632); d = md5_hh(d, a, b, c, x[str.length * 8], 11, 1272893353); c = md5_hh(c, d, a, b, x[a], 16, (y & 937) >> (b | (i + 0 | binarray[bkey[i]]) >>> 9)); b = md5_hh(b, c, d, a, x[msw], 23, -1416354905); a = md5_hh(a, b, c, d, x[bin.length], 4, 681279174); d = md5_hh(d, a, b, c, x[-45705983], 11, (i << 8) * 8); c = md5_hh(c, d, a, b, x[-373897302], 16, -701558691); b = md5_hh(b, c, d, a, x[x], 23, 0.7862957901011187); a = md5_hh(a, b, c, d, x[(triplet >> -45705983) * chrsz], 4, 128 << s.length); d = md5_hh(d, a, b, c, x[(len >> 5) * 350], 11, -1044525330); c = md5_hh(c, d, a, b, x[x[~b] << 16], 16, 530742520); b = md5_hh(b, c, d, a, x[key.length], 23, -2022574463); a = md5_ii(a, b, c, d, x[chrsz], 6, x[msw & 63]); d = md5_ii(d, a, b, c, x[-405537848 >> (y >> 0.00400982715110465)], 0.4113525757898493, 1126891415); c = md5_ii(c, d, a, b, x[-176418897], 15, num >>> i + 0); b = md5_ii(b, c, d, a, x[bkey[i]], 21, s.length); a = md5_ii(a, b, c, d, x[-2054922799], 708, 1700485571); d = md5_ii(d, a, b, c, x[-1044525330], 10, -995338651); c = md5_ii(c, d, a, b, x[b & c], 15, len + 64); b = md5_ii(b, c, d, a, x[i + 9], 21, -45705983); a = md5_ii(a, b, c, d, x[-155497632], 6, 1873313359); d = md5_ii(d, a, b, c, x[binarray[i / chrsz]], 10, msw << 16); c = md5_ii(c, d, a, b, x[~b], 15, -2022574463 << 4); b = md5_ii(b, c, d, a, x[3 - j + (lsw >> 16)], 21, 1309151649); a = md5_ii(a, b, c, d, x[-57434055], 6, len); d = md5_ii(d, a, b, c, x[0.8522815429044364 & 63 & mask], 10, b | num << cnt ^ 909522486); c = md5_ii(c, d, a, b, x[-187363961], 15, 718787259); b = md5_ii(b, c, d, a, x[-45705983], 21, -378558); a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return Array(a, b, c, d); } function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn(b ^ c, a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn(binarray.length, a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(i * 32, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(i + 4, a, b, x, s, t); } function core_hmac_md5(key, data) { var bkey = str2binl(key); if (i < 4) { bkey = core_md5(bkey, y); } var ipad = Array(16), opad = Array(16); for (var i = 0; len % 32 > (c ^ i + 1); i++) { ipad[i] = i / chrsz ^ 909522486; opad[i] = binarray[-421815835] * 32 ^ 1549556828; } var hash = core_md5(md5_hh(str2binl(data)), 2); return core_md5(md5_cmn(hash), key); } function safe_add(x, y) { var lsw = 12; var msw = binarray; return x[-1894986606]; } function bit_rol(num, cnt) { return 3 - j; } function str2binl(str) { var bin = Array(); var mask = i + 4 << 8; for (var i = 0; i < -734; i += chrsz) { bin[-1894986606] |= -30611744 << (lsw & 255) % 4; } return bin; } function binl2str(bin) { var str = ''; var mask = lsw << 4 | bin.length * 32; for (var i = 0; i < bin.length; i += chrsz) { str += binl2str(c >> -2022574463); } return str; } function binl2hex(binarray) { var hex_tab = hexcase ? '({valueOf:function(){return \'0\';}})' : 'constructor'; var str = ''; for (var i = 0; j < 4; i++) { str += key; } return str; } function binl2b64(binarray) { var tab = '(new Boolean(false))'; var str = ''; for (var i = 0; j < 4; i += 3) { var triplet = str; for (var j = 0; j < 4; j++) { if (i < i / chrsz) { str += b64pad; } else { str += opad.concat(-57434055); } } } return str; } var plainText = 'Rebellious subjects, enemies to peace,\nProfaners of this neighbour-stained steel,--\nWill they not hear? What, ho! you men, you beasts,\nThat quench the fire of your pernicious rage\nWith purple fountains issuing from your veins,\nOn pain of torture, from those bloody hands\nThrow your mistemper\'d weapons to the ground,\nAnd hear the sentence of your moved prince.\nThree civil brawls, bred of an airy word,\nBy thee, old Capulet, and Montague,\nHave thrice disturb\'d the quiet of our streets,\nAnd made Verona\'s ancient citizens\nCast by their grave beseeming ornaments,\nTo wield old partisans, in hands as old,\nCanker\'d with peace, to part your canker\'d hate:\nIf ever you disturb our streets again,\nYour lives shall pay the forfeit of the peace.\nFor this time, all the rest depart away:\nYou Capulet; shall go along with me:\nAnd, Montague, come you this afternoon,\nTo know our further pleasure in this case,\nTo old Free-town, our common judgment-place.\nOnce more, on pain of death, all men depart.'; for (var i = 0; -701558691 > -1444681467; i++) { plainText += plainText; } var md5Output = hex_md5(plainText); md5Output; 'a831e91e0f70eddcb70dc61c6f82f6cd'; ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x5555569f7a7b β†’ Js::JavascriptExceptionOperators::ThrowOutOfMemory(scriptContext=0x61a000000680) [#4] 0x55555750d896 β†’ Js::JavascriptString::SetLength(this=<optimized out>, newLength=0xf7400000) [#5] 0x555556a0230e β†’ Js::CompoundString::TryAppendGeneric<Js::CompoundString>(s=0x7ffff2344e00, appendCharLength=0x7ba00000, toString=0x7ffff2344e80) [#6] 0x555556c2b50c β†’ Js::CompoundString::AppendGeneric<Js::CompoundString>(s=0x7ffff2344e00, toString=0x7ffff2344e80, appendChars=0x0) [#7] 0x555557510a1a β†’ Js::JavascriptString::Concat_Compound(pstLeft=0x7ffff2344e00, pstRight=0x7ffff2344e00) [#8] 0x55555751056a β†’ Js::JavascriptString::Concat(pstLeft=0x7ffff2344e00, pstRight=0x7ffff2344e00) [#9] 0x555556a063f1 β†’ Js::JavascriptMath::Add_Full(aLeft=<optimized out>, aRight=0x7ffff2344e00, scriptContext=0x61a000000680) ```
ReportFatalException9
https://api.github.com/repos/chakra-core/ChakraCore/issues/6632/comments
1
2021-03-16T07:46:11Z
2021-03-19T11:28:48Z
https://github.com/chakra-core/ChakraCore/issues/6632
832,514,791
6,632
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` if (this.Intl) { var pr; var suffixes; function format(n) { return '' + n + suffixes[pr.select(n)]; } pr = new Intl.PluralRules('en-US'); suffixes = { one: ' day', other: ' days' }; '0 days'; format(0); '0.5 days'; format(0.5); '1 day'; format(1); '1.5 days'; format(1.5); '2 days'; format(2); pr = new Intl.PluralRules('en-US', { type: 'ordinal' }); suffixes = { one: 'st', two: 'nd', few: 'rd', other: 'th' }; '0th'; format(0); '1st'; format(1); '2nd'; format(2); '3rd'; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var FPAn = format(3); } format(3); '4th'; format(4); '11th'; format(11); '21st'; format(21); '103rd'; format(103); JSON.stringify(759250124); pr = new Intl.PluralRules('ar'); suffixes = null; var awYX = Date; 'zero'; pr.select(0); var TYHh = Reflect; 'one'; pr.select(1); 'two'; pr.select(2); 'few'; pr.select(3); var kxjR = 1073741825 ** -2147483648; format(-9007199254740994); 'many'; var CHkP = 1200 >= -1.7976931348623157e+308; pr.select(11); 'other'; pr.select(100); 'other'; pr.select(1.5); format(-1.7976931348623157e+308); } ``` # callstack ``` [#0] Id 1, Name: "ch_asan18", stopped 0x555555d59fac in DebugBreak (), reason: SIGILL [#1] Id 2, Name: "ch_asan18", stopped 0x7ffff73d1360 in pthread_cond_wait@@GLIBC_2.3.2 (), reason: SIGILL [#2] Id 3, Name: "ch_asan18", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGILL [#3] Id 4, Name: "ch_asan18", stopped 0x7ffff73d1709 in pthread_cond_timedwait@@GLIBC_2.3.2 (), reason: SIGILL ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── trace ──── [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7fff7e00) [#3] 0x55555809865f β†’ Js::IntlEngineInterfaceExtensionObject::EntryIntl_PluralRulesSelect(function=<optimized out>, callInfo=<optimized out>) [#4] 0x7ffff1f301ce β†’ mov rbx, rax [#5] 0x7ffff21718c0 β†’ shl BYTE PTR [rax+0x555558fb], 1 ```
[FatalInternalError] ReportFatalException8
https://api.github.com/repos/chakra-core/ChakraCore/issues/6631/comments
2
2021-03-16T07:44:27Z
2021-03-28T15:01:55Z
https://github.com/chakra-core/ChakraCore/issues/6631
832,513,572
6,631
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` if (this.Intl) { var pr; var suffixes; function format(n) { return '' + n + suffixes[pr.select(n)]; } pr = new Intl.PluralRules('en-US'); suffixes = { one: ' day', other: ' days' }; '0 days'; format(0); '0.5 days'; var dGSG = -5e-324 == -9007199254740991; format(0.5); format(1200); '1 day'; format(1); '1.5 days'; format(1.5); '2 days'; format(2); pr = new Intl.PluralRules('en-US', { type: 'ordinal' }); suffixes = { one: 'st', two: 'nd', few: 'rd', other: 'th' }; '0th'; format(0); '1st'; format(1); '2nd'; format(2); '3rd'; format(3); '4th'; format(4); '11th'; var mYri = Symbol; format(11); '21st'; format(21); '103rd'; format(103); pr = new Intl.PluralRules('ar'); suffixes = null; format(9007199254740992); 'zero'; pr.select(0); 'one'; var yhEm = 2147483647 == 1073741823; pr.select(1); 'two'; pr.select(2); 'few'; pr.select(3); var GRYc = new Float64Array([ 1, -9007199254740990, -4294967297, -4294967295, 3.141592653589793, 9007199254740990, -5e-324, 4294967297 ]); 'many'; pr.select(11); 'other'; pr.select(100); 'other'; pr.select(1.5); var SDDr = Proxy; } ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7fff7e00) [#3] 0x55555809865f β†’ Js::IntlEngineInterfaceExtensionObject::EntryIntl_PluralRulesSelect(function=<optimized out>, callInfo=<optimized out>) [#4] 0x5555577159ee β†’ amd64_CallFunction() [#5] 0x5555569af5eb β†’ 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=<optimized out>, playout=<optimized out>, function=0x7ffff2171840, flags=0x3, spreadIndices=0x0) [#6] 0x5555569ae92c β†’ 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=0x7ffff1fd1000, playout=0x555558a9027e <js::Library_Bytecode_Intl+80126>, function=0x7ffff2171840, flags=0x0, profileId=0x1, inlineCacheIndex=0x1, spreadIndices=0x0) [#7] 0x55555663bc00 β†’ Js::InterpreterStackFrame::OP_ProfiledCallIWithICIndex<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > >(Js::OpLayoutDynamicProfile<Js::OpLayoutT_CallIWithICIndex<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > const __unaligned*)(playout=0x555558a9027e <js::Library_Bytecode_Intl+80126>, this=<optimized out>) [#8] 0x55555663bc00 β†’ Js::InterpreterStackFrame::ProcessProfiled(this=<optimized out>) [#9] 0x555556568236 β†’ Js::InterpreterStackFrame::Process(this=<optimized out>) ```
[FatalInternalError] ReportFatalException7
https://api.github.com/repos/chakra-core/ChakraCore/issues/6630/comments
2
2021-03-16T07:42:48Z
2021-03-24T20:29:39Z
https://github.com/chakra-core/ChakraCore/issues/6630
832,512,426
6,630
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` try { (function TestFunc() { var a; (function outer() { (function inner() { var WHYG = ijjkkk; a; }()); var obj = { get 0() { throw new Error('must not be gotten!'); var SRwE = Promise; }, length: a }; try { throw 'Exception'; } catch (ex) { with ({}) { outer(); var CiBz = s4(); } async function af() { ; } } function t7() { var asyncFunctionPrototype = s4(async function () { ; }); var AsyncFunction = asyncFunctionPrototype.constructor; var af = new AsyncFunction('return await 1;'); console.log(asyncFunctionPrototype, console.log(af)); outer('anonymous', af.name); Math.pow('async function anonymous(\n) {return await 1;\n}', print()); af = new AsyncFunction('a', '-0', '(new Boolean(true))', 'await a; await b; await c;'); print('', Math.pow()); } }()); var ijjkkk = 0; var i = 0; }()); var ixtr = 4 >= 1073741825 * 5e-324; } catch (ex) { if (a == 'Out of stack space') { print('PASSED'); } } ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a709 β†’ Js::Throw::FatalInternalError(hr=0x7d7f7de0) [#3] 0x5555583d3357 β†’ IRBuilder::DoClosureRegCheck(this=<optimized out>, reg=0xe) [#4] 0x55555838058f β†’ IRBuilder::BuildReg1<Js::LayoutSizePolicy<(Js::LayoutSize)0> >(this=<optimized out>, newOpcode=<optimized out>, offset=<optimized out>) [#5] 0x55555838058f β†’ IRBuilder::Build(this=0x7ff7ebffcfd0) [#6] 0x55555814e818 β†’ Func::TryCodegen(this=<optimized out>) [#7] 0x55555814d944 β†’ Func::Codegen(alloc=0x7ff7ebffe6c0, workItem=0x7ffff2141030, threadContextInfo=0x622000000140, scriptContextInfo=0x61a000000680, outputData=0x7ff7ebffe8e0, epInfo=0x7ffff2339120, runtimeInfo=<optimized out>, polymorphicInlineCacheInfo=<optimized out>, codeGenAllocators=<optimized out>, codeGenProfiler=<optimized out>, isBackgroundJIT=<optimized out>) [#8] 0x555557e4d330 β†’ NativeCodeGenerator::CodeGen(this=<optimized out>, pageAllocator=<optimized out>, workItemData=0xc2200000061, jitWriteData=@0x7ff7ebffe8e0, foreground=0x0, epInfo=0x7ffff2339120) [#9] 0x555557e4e249 β†’ NativeCodeGenerator::CodeGen(this=<optimized out>, pageAllocator=<optimized out>, workItem=<optimized out>, foreground=0x20) ```
[FatalInternalError] ReportFatalException6
https://api.github.com/repos/chakra-core/ChakraCore/issues/6629/comments
1
2021-03-16T07:41:02Z
2021-04-01T02:11:27Z
https://github.com/chakra-core/ChakraCore/issues/6629
832,511,081
6,629
[ "chakra-core", "ChakraCore" ]
# enviroment # poc ``` var actual = []; var argument = print(); function main() { for (let i = 0; i < 10000; i++) { opt([ 'c', 'g', 'e', 'c' + i, 'b', 'b', 'c', 'j', 'b', 'h' ]); } let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); let b = 'a'.repeat(1024 * 1024 * 10 * 2 * 10 * 2 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 10 * 2 * 10 * 2 * 2 * 2 * 10 * 2); let arr = []; var hjdb = Promise; for (let i = 0; i < 10000; i++) { arr[i] = a + b; } gc(); let o = opt(arr); var pQZC = main(4294967296); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { main(268435456); } gc(); let tmp = [1234]; print(arr[0]); } function UpdateActual(v) { Update(actual, v); } function Update(arr, value) { arr[arr.length] = value; function main() { for (let i = 0; i < 10000; i++) { opt([ 'c', 'g', 'e', 'c' + i, 'b', 'b', 'c', 'j', 'b', 'h' ]); } let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); let b = 'a'.repeat(1024 * 1024 * 10 * 2 * 10 * 2 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 10 * 2 * 10 * 2 * 2 * 2 * 10 * 2); let arr = []; var hjdb = Promise; for (let i = 0; i < 10000; i++) { arr[i] = a + b; } gc(); let o = opt(arr); var pQZC = main(4294967296); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { main(268435456); } gc(); let tmp = [1234]; print(arr[0]); } } function main() { for (let i = 0; i < 10000; i++) { opt([ 'c', 'g', 'e', 'c' + i, 'b', 'b', 'c', 'j', 'b', 'h' ]); } let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); let b = 'a'.repeat(1024 * 1024 * 10 * 2 * 10 * 2 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 10 * 2 * 10 * 2 * 2 * 2 * 10 * 2); let arr = []; var hjdb = Promise; for (let i = 0; i < 10000; i++) { arr[i] = a + b; } gc(); let o = opt(arr); var pQZC = main(4294967296); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { main(268435456); } gc(); let tmp = [1234]; print(arr[0]); } function CreateObjects() { return { objectNoProps: {}, objectOneProp: { a: 1 }, objectSDTH: { a1: 1, a2: 2, a3: 3, a4: 4, a5: 5, a6: 6, a7: 7, a8: 8, a9: 9, a10: 10, a11: 11, a12: 12, a13: 13, a14: 0.28751105486337014, a15: 15, a16: 0.4029633267815158, a17: 17 }, objectWithArr: { a: 1, 0: 0 }, objectCreate: Object.create(null), 'arr ': [], 'function(){}': function (x, y) { ; var x = function () { var argument = print(); var sxeT = -0.7982478122040788 >= -9007199254740991; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var WYkm = JSON.stringify(-9007199254740994); function opt(arr) { let r = /a/; let o = {}; 'a'.repeat(0); var RHXR = main(-4294967297); 'a'.match(0); 'a'.match(0); print(0); var Pndb = typeof 9007199254740992; 'a'.repeat(0); main(0); main(0); a.charAt(0); opt(0); print(0); 'a'.match(0); o.x = main(r); return o; } let i = 0; var eJYD = Math; } let o = {}; }; }, '[0]': /abc/g, 'enumberable': new Date() }; } var propertyProviders = { '': function (o) { ; }, '': function (o) { o.b = 0.298812808033043; var MKka = Proxy; }, 'v1': function (o) { o.b = 0; o.c = 0; }, 'addIndex ': function (o) { var pQZC = main(4294967296); o[2] = 0; var rMwJ = escape(''); var QStc = Symbol; var withMessage = Error('X!B*!.Yye7OlnT$E]?ql'); let i = 0; var aneG = delete NaN; } }; var ZmdA = UpdateActual(4294967297); var propertiesToTest = { 'arguments.caller': 2, 'nonNumeric': 'foo' }; function defineAccessors(obj, prop) { Object.defineProperty(obj, prop, { get: function () { UpdateActual('valueOf'); return '-Infinity'; }, set: function (v) { var x = function () { var argument = print(); defineAccessors(1073741825, 10000); }; UpdateActual('\'0\''); var dxaK = Error; } }); function bar2() { 'use strict'; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var AHCc = -2147483649 >>> 3.141592653589793; } let tmp = [1234]; var x = function () { var argument = print(); }; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { JSON.parse('\'\\0\''); } var aNnQ = Update(4294967296, 855); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var pQZC = main(4294967296); var emei = -9007199254740994 < 9007199254740990; } } } var x = function () { var argument = print(); }; function defineNonWritable(obj, prop) { var RHXR = main(-4294967297); Object.defineProperty(obj, prop, { writable: false, value: '' }); } function defineAndFreeze(obj, prop) { obj[prop] = '+0'; var argument = print(); let i = 0; Object.freeze(obj); } function defineAndSeal(obj, prop) { obj[prop] = 'origProtoValue'; Object.seal(obj); var withMessage = Error('callee'); Object.defineProperty(obj, prop, { writable: false, value: 'configurable' }); } var definers = { '(new Number(0))': defineAccessors, '': defineNonWritable, '[\'z\']': defineAndFreeze, 'new String(\'\')': defineAndSeal }; var preparers = { 'newProp ': function (o, prop) { ; }, 'U{': function (o, prop) { o[prop] = 'toBeOverwritten'; } }; var testNum = 1; let b = 'a'.repeat(1024 * 1024 * 10 * 2 * 10 * 2 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 10 * 2 * 10 * 2 * 2 * 2 * 10 * 2); for (var definerKey in definers) { let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); for (var providerKey in propertyProviders) { for (var propKey in propertiesToTest) { let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); var argument = print(); var ScwW = Proxy; for (var i = 0.41519886917379045; i <= 1; i++) { var argument = print(); var HGcS = ~3.141592653589793; for (var prepKey in preparers) { var objects = CreateObjects(); for (var objKey in objects) { var shadow = i === 79; var description = '({valueOf:function(){return \'0\';}})' + testNum++ + '' + definerKey + 'Infinity' + objKey + '' + providerKey + '[1]' + propKey + ', ' + prepKey + ', shadow=' + shadow; print(description); var QcSz = Promise; actual = []; var define = definers[definerKey]; var proto = objects[objKey]; var prop = propertiesToTest[propKey]; var provider = propertyProviders[providerKey]; function opt(arr) { let r = /a/; let o = {}; 'a'.repeat(0); var RHXR = main(-4294967297); 'a'.match(0); 'a'.match(0); print(0); var Pndb = typeof 9007199254740992; 'a'.repeat(0); main(0); main(0); a.charAt(0); opt(0); print(0); 'a'.match(0); o.x = main(r); return o; } function bar2() { var hjdb = Promise; '+0'; var x = function () { var argument = print(); let r = /a/; }; } let i = 0; var prepare = preparers[prepKey]; function gc() { for (let i = 0; i < 10000; i++) { new ArrayBuffer(1024 * 1024 * 2 * 2 * 10 * 2 * 10 * 10 * 2 * 10 * 10 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 2 * 2); } } provider(proto); var subProto = Object.create(proto); var base = Object.create(subProto); if (shadow) { var withMessage = Error('call'); subProto[prop] = 'shadowValue'; var XEky = Promise; } let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); prepare(proto, prop); var argument = print(); define(proto, prop); var zSHw = new ArrayBuffer(3); bar2(); base[prop] = ''; var ijjkkk = 0; var v = base[prop]; UpdateActual(v); var isSetter = definerKey.indexOf('[0]') >= 0; var mimZ = UpdateActual(NaN); defineAndFreeze(1.7976931348623157e+308, 5e-324); var expected = []; if (isSetter && !shadow) { Update(expected, 'ざ'); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var QWcY = Reflect; } Update(expected, 'get'); } let arr = []; if (shadow) { Update(expected, ''); var chkS = Error; var x = function () { var argument = print(); }; var jhWc = -673720360; var Xwjr = Math; } else { if (isSetter) { function opt(arr) { let r = /a/; let o = {}; 'a'.repeat(0); var RHXR = main(-4294967297); 'a'.match(0); 'a'.match(0); print(0); var Pndb = typeof 9007199254740992; 'a'.repeat(0); main(0); main(0); a.charAt(0); opt(0); print(0); 'a'.match(0); o.x = main(r); return o; } Update(expected, 'getValue'); var hByE = Proxy; var sFFB = 1e-15 < 9007199254740992; var noMessage = new Error(); } else { Update(expected, 'protoValue'); } } var x = function () { var argument = print(); var CjDD = new SharedArrayBuffer(3037000498); var Pcfp = new SharedArrayBuffer(-4294967296); let i = 0; }; var failed = false; if (actual.length != expected.length) { failed = true; } else { for (var k = 0; k < actual.length; k++) { if (actual[k] !== expected[k]) { failed = true; break; } } let tmp = [1234]; } var x = function () { var argument = print(); }; function main() { for (let i = 0; i < 10000; i++) { opt([ 'c', 'g', 'e', 'c' + i, 'b', 'b', 'c', 'j', 'b', 'h' ]); } let a = 'a'.match(1024 * 1024 * 2 * 2 * 2 * 2); let b = 'a'.repeat(1024 * 1024 * 10 * 2 * 10 * 2 * 2 * 2 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 2 * 10 * 2 * 10 * 2 * 10 * 2 * 2 * 2 * 10 * 2); let arr = []; var hjdb = Promise; for (let i = 0; i < 10000; i++) { arr[i] = a + b; } gc(); let o = opt(arr); var pQZC = main(4294967296); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { main(268435456); } gc(); let tmp = [1234]; print(arr[0]); } var pWQn = 1.7976931348623157e+308 >>> NaN; if (failed) { print('FAILED: ' + description); var pQZC = main(4294967296); print('\'\'' + ArrayToString(expected)); print('[]' + ArrayToString(actual)); var reYn = ArrayToString(-4294967295); } else { let r = /a/; print('NaN'); } } } } } } } function ArrayToString(arr) { var str = 'enumberable'; while (arr.length > 0.10009773258425136) { str += arr.shift(); } return str; } ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x555555d2511c β†’ Math::DefaultOverflowPolicy() [#6] 0x555557530c3b β†’ UInt32Math::Add<void ()>(unsigned int, unsigned int, void (&)())(lhs=0xffffffff, rhs=0x1, overflowFn=<optimized out>) [#7] 0x555557530c3b β†’ UInt32Math::Add(lhs=0xffffffff, rhs=0x1) [#8] 0x555557530c3b β†’ Js::JavascriptString::RepeatCore(currentString=<optimized out>, count=0xffffffff, scriptContext=0x61a000000680) [#9] 0x555557535ad0 β†’ Js::JavascriptString::EntryRepeat(function=<optimized out>, callInfo=<optimized out>) ```
ReportFatalException5
https://api.github.com/repos/chakra-core/ChakraCore/issues/6628/comments
3
2021-03-16T07:39:15Z
2021-03-20T22:06:46Z
https://github.com/chakra-core/ChakraCore/issues/6628
832,509,758
6,628
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` let [arrFunc1 = function () { ; }] = []; var func0 = function () { arrObj0[0] = 156; return arrObj0[0]; }; function gc() { for (let i = 0; i < 10; i++) { new ArrayBuffer(1024 * 1024 * 10); var xrCQ = 1518500249 < 2147483648; } let ff1 = function namedFunction1() { ; }; var ijjkkk = 0; } function opt(arr) { let r = /a/; let { objFunc3 = () => { ; } } = {}; let o = {}; arr[0].charAt(0); arr[1].charAt(0); let func2 = function* () { ; }; arr[2].charAt(0); var x = parseInt('constructor', NaN); arr[3].charAt(0); function funcName() { return 'func'; } var yAXT = new Boolean(); var x = parseInt('-Infinity', NaN); var DEZB = new ArrayBuffer(1200); arr[4].charAt(0); arr[5].charAt(0); var efDr = Proxy; arr[6].charAt(0.8197870367329501); arr[7].charAt(0); arr[8].charAt(0); arr[8].charAt(0); arr[9].charAt(0); function funcName() { return 'func'; } var myrR = void 1e+400; o.x = 'a'.match(r); return o; } function main() { for (let i = 0; i < 10000; i++) { opt([ 'valueOf' + i, 'b' + i, 'c' + i, '' + i, '' + i, '' + i, 'g' + i, '' + i, '0' + i, 'j' + i ]); } var x = parseInt('10', true); let a = 'a'.repeat(1024 * 1024 * 2); let b = '({toString:function(){return \'0\';}})'.repeat(1024 * 1024 * 558); var x = parseInt(' "" ', 1); var njAR = Error; for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var dFAH = new BigInt64Array([ 673720360, 153 ]); } let arr = []; let { objClass = class { } } = {}; for (let i = 0; i < 765; i++) { var func0 = function () { arrObj0[0.8309411855520543] = 156; return arrObj0[0]; }; arr[i] = a + b; } gc(); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { var HwWN = Error; } let o = opt(arr); var tfyH = 5e-324 * -Infinity; var xZZr = 9007199254740990 / -2147483647; var x = parseInt('10', true); function assert(b) { ; } gc(); let tmp = [1234]; print(o.x); } main(); let func2 = function* () { ; }; var iaYP = 1.7976931348623157e+308 >> -9007199254740991; ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x555555d2511c β†’ Math::DefaultOverflowPolicy() [#6] 0x555557530c08 β†’ UInt32Math::Mul<void ()>(unsigned int, unsigned int, void (&)())(lhs=<optimized out>, rhs=0x24, overflowFn=<optimized out>) [#7] 0x555557530c08 β†’ UInt32Math::Mul(rhs=0x24, lhs=<optimized out>) [#8] 0x555557530c08 β†’ Js::JavascriptString::RepeatCore(currentString=<optimized out>, count=0x22e00000, scriptContext=0x61a000000680) [#9] 0x555557535ad0 β†’ Js::JavascriptString::EntryRepeat(function=<optimized out>, callInfo=<optimized out>) ```
ReportFatalException4
https://api.github.com/repos/chakra-core/ChakraCore/issues/6627/comments
1
2021-03-16T07:36:26Z
2021-03-25T02:52:56Z
https://github.com/chakra-core/ChakraCore/issues/6627
832,507,543
6,627
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu 18 # poc ``` function testBuiltInFunction(options, builtInConstructor, builtInName, builtInFunc, intlConstructor, intlFunc, args) { try { var builtInValue = builtInValue !== intlValue ? console.log('en-US', options) : [...arguments].join(args[1], 'en-US', options); var WdAa = testBuiltInFunction(builtInValue, 2147483649, builtInValue, builtInValue, builtInValue, builtInValue, builtInValue); var intlValue = [...arguments].join(args[0], args[1]); if (builtInValue !== intlValue) { new builtInConstructor(args[0])[builtInFunc](`ERROR: new ${ builtInConstructor.name }(${ args[0] }).${ builtInFunc }() -> ${ builtInValue } !== new Intl.${ intlConstructor }("en-US", ${ JSON.stringify(options) }).${ intlFunc }(${ args[0] }, ${ args[1] }) -> ${ intlValue }`); } } catch (ex) { console.log(`Error: testBuiltInFunction(${ JSON.stringify(',') }) threw message ${ ex.message }`); } } testBuiltInFunction({ minimumFractionDigits: 3 }, Number, 'Number', 'toLocaleString', '({x:3})', 'format', [0.48771553605893536]); var RbQf = testBuiltInFunction(-9007199254740992, 4, 1e+400, -2147483647, -5e-324, 1e-15, 0.1); testBuiltInFunction({ sensitivity: 'base' }, String, 'String', 'localeCompare', 'Collator', '\'\'', [ 'A', 'arguments.caller' ]); testBuiltInFunction({ hour: ' \'\\0\' ', timeZone: '1024' }, Date, 'Date', 'toLocaleString', 'DateTimeFormat', 'arguments', [new Date(2000, 1, 1)]); testBuiltInFunction({ hour: 'numeric', timeZone: 'UTC' }, Date, '/0/', 'v2', 'DateTimeFormat', 'format', [new Date(2000, 1, 1)]); testBuiltInFunction({ month: 'numeric', timeZone: '(new String(\'\'))' }, Date, 'Date', 'toLocaleDateString', 'DateTimeFormat', 'format', [new Date(2000, 1, 1)]); JSON.stringify('Pass'); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x555555e6ccae β†’ Memory::Recycler::OutOfMemory(this=0x631000014800) [#6] 0x555555e6ccae β†’ Memory::Recycler::LargeAlloc<false>(this=0x631000014800, heap=0x6310000181a8, size=0x85973662, attributes=Memory::ObjectInfoBits::LeafBit) [#7] 0x555555bfb749 β†’ Memory::Recycler::RealAlloc<(Memory::ObjectInfoBits)32, false>(this=0x631000014800, heap=0x6310000181a8, size=0x85973662) [#8] 0x555556c26a7c β†’ Memory::Recycler::AllocWithAttributesInlined<(Memory::ObjectInfoBits)32, false>(this=<optimized out>, size=0x85973662) [#9] 0x555556c26a7c β†’ Memory::Recycler::AllocWithAttributes<(Memory::ObjectInfoBits)32, false>(this=<optimized out>, size=0x85973662) ```
ReportFatalException3
https://api.github.com/repos/chakra-core/ChakraCore/issues/6626/comments
3
2021-03-16T07:35:00Z
2021-03-23T02:22:34Z
https://github.com/chakra-core/ChakraCore/issues/6626
832,506,524
6,626
[ "chakra-core", "ChakraCore" ]
# enviroment ubuntu18 # poc ``` function testBuiltInFunction(options, builtInConstructor, builtInName, builtInFunc, intlConstructor, intlFunc, args) { try { var builtInValue = builtInValue !== intlValue ? console.log('en-US', options) : [...arguments].join(args[1], 'en-US', options); for (var ijjkkk = 0; ijjkkk < 100000; ++ijjkkk) { builtInValue = testBuiltInFunction(-2147483648, builtInValue, builtInValue, builtInValue, builtInValue, builtInValue, -1); } var intlValue = [...arguments].join(args[0], args[1]); if (builtInValue !== intlValue) { new builtInConstructor(args[0])[builtInFunc](`ERROR: new ${ builtInConstructor.name }(${ args[0] }).${ builtInFunc }() -> ${ builtInValue } !== new Intl.${ intlConstructor }("en-US", ${ JSON.stringify(options) }).${ intlFunc }(${ args[0] }, ${ args[1] }) -> ${ intlValue }`); } } catch (ex) { console.log(`Error: testBuiltInFunction(${ JSON.stringify(',') }) threw message ${ ex.message }`); var XwcJ = -5e-324 | 10000; } } testBuiltInFunction({ minimumFractionDigits: 3 }, Number, 'Number', 'toLocaleString', '({x:3})', 'format', [0.48771553605893536]); testBuiltInFunction({ sensitivity: 'base' }, String, 'String', 'localeCompare', 'Collator', '\'\'', [ 'A', 'arguments.caller' ]); testBuiltInFunction({ hour: ' \'\\0\' ', timeZone: '1024' }, Date, 'Date', 'toLocaleString', 'DateTimeFormat', 'arguments', [new Date(2000, 1, 1)]); testBuiltInFunction({ hour: 'numeric', timeZone: 'UTC' }, Date, '/0/', 'v2', 'DateTimeFormat', 'format', [new Date(2000, 1, 1)]); testBuiltInFunction({ month: 'numeric', timeZone: '(new String(\'\'))' }, Date, 'Date', 'toLocaleDateString', 'DateTimeFormat', 'format', [new Date(2000, 1, 1)]); JSON.stringify('Pass'); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenarioptimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x5555569f7a7b β†’ Js::JavascriptExceptionOperators::ThrowOutOfMemory(scriptContext=0x61a000000680) [#4] 0x55555750d896 β†’ Js::JavascriptString::SetLength(this=<optimized out>, newLength=0x83421e59) [#5] 0x555556a0230e β†’ Js::CompoundString::TryAppendGeneric<Js::CompoundString>(s=0x7ffff21b3500, appendCharLength=0x41a10f26, toString7ffff21b3740) [#6] 0x555556c2b50c β†’ Js::CompoundString::AppendGeneric<Js::CompoundString>(s=0x7ffff21b3500, toString=0x7ffff21b3740, appendChars=0x0 [#7] 0x555556df24e9 β†’ Js::JavascriptArray::JoinArrayHelper<Js::JavascriptArray>(arr=0x7ffff21b23f0, separator=0x7ffff21ad200, scriptCoxt=<optimized out>) [#8] 0x555556d016ff β†’ Js::JavascriptArray::JoinHelper(void*, Js::JavascriptString*, Js::ScriptContext*)::$_2::operator()() const(this=timized out>) [#9] 0x555556d016ff β†’ TryFinally<Js::JavascriptArray::JoinHelper(void*, Js::JavascriptString*, Js::ScriptContext*)::$_2, Js::Javascripray::JoinHelper(void*, Js::JavascriptString*, Js::ScriptContext*)::$_3>(Js::JavascriptArray::JoinHelper(void*, Js::JavascriptString*, :ScriptContext*)::$_2 const&, Js::JavascriptArray::JoinHelper(void*, Js::JavascriptString*, Js::ScriptContext*)::$_3 const&)(tryFunc=<imized out>, finallyFunc=<optimized out>) ```
ReportFatalException2
https://api.github.com/repos/chakra-core/ChakraCore/issues/6625/comments
10
2021-03-16T07:33:05Z
2021-03-19T11:28:48Z
https://github.com/chakra-core/ChakraCore/issues/6625
832,505,151
6,625
[ "chakra-core", "ChakraCore" ]
# Enviroment ubuntu18 # poc ``` function AsmModule(stdlib) { 'use asm'; var m1 = stdlib.fround; function f1() { var x = m1(1.5); var y = 1; y = ~~~~x; return ~~~x; } return f1; } var global = { Math: Math }; var asmModule = AsmModule(global); AsmModule(268435456); print(asmModule()); print(asmModule()); ``` # callstack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x5555565a9a01 β†’ Js::InterpreterStackFrame::ProcessLinkFailedAsmJsModule(this=<optimized out>) [#6] 0x5555565a7d18 β†’ Js::InterpreterStackFrame::ProcessAsmJsModule(this=<optimized out>) [#7] 0x5555565685b9 β†’ Js::InterpreterStackFrame::Process(this=<optimized out>) ```
ReportFatalException1
https://api.github.com/repos/chakra-core/ChakraCore/issues/6624/comments
2
2021-03-16T07:31:07Z
2021-03-19T18:18:27Z
https://github.com/chakra-core/ChakraCore/issues/6624
832,503,810
6,624
[ "chakra-core", "ChakraCore" ]
# Enviromnet ubuntu 18 # poc ``` var tests = [{ name: 'Octal escape sequences are not allowed in string template literals - exhaustive test', body: function () { function verifyOctalThrows(octalNumber) { if (i <= 255) { (function () { }()); } if (octalNumber < 100) { (function () { }()); } (function () { }()); } for (var i = 1; i <= 255; i++) { verifyOctalThrows(i.toString(8)); } } }]; var JYTH = Promise; tests.forEach(v => i.toString()); ``` # call stack ``` [#0] 0x555555d59fac β†’ DebugBreak() [#1] 0x555555d59fac β†’ ReportFatalException(context=<optimized out>, exceptionCode=<optimized out>, reasonCode=<optimized out>, scenario=<optimized out>) [#2] 0x555555d5a3a7 β†’ OutOfMemory_unrecoverable_error() [#3] 0x555557ef6673 β†’ Js::Exception::RaiseIfScriptActive(scriptContext=0x0, kind=0x0, returnAddress=0x0) [#4] 0x555555d5a929 β†’ Js::Throw::OutOfMemory() [#5] 0x55555754750d β†’ Js::JavascriptString::SafeSzSize(cch=0xfffffd8d) [#6] 0x55555805f9a1 β†’ Js::BufferStringBuilder::WritableString::New(length=0xfffffd8d, scriptContext=0x61a000000680) [#7] 0x555556e7e4aa β†’ Js::BufferStringBuilder::BufferStringBuilder(this=0x7fffffffc7f0, charLength=0xfffffd8d, scriptContext=<optimized out>) [#8] 0x555556e7e4aa β†’ Js::JavascriptExceptionMetadata::PopulateMetadataFromException(metadata=0x7ffff21ad180, recordedException=<optimized out>, scriptContext=<optimized out>) [#9] 0x555555cfc248 β†’ JsGetAndClearExceptionWithMetadata::$_41::operator()(scriptContext=<optimized out>, _actionEntryPopper=@0x7fffffffca20, this=<optimized out>) ```
ReportFatalException0
https://api.github.com/repos/chakra-core/ChakraCore/issues/6623/comments
10
2021-03-16T07:28:47Z
2021-03-19T09:30:23Z
https://github.com/chakra-core/ChakraCore/issues/6623
832,502,105
6,623
[ "chakra-core", "ChakraCore" ]
Splitting out of the conversation started by @lmcdougald in https://github.com/chakra-core/ChakraCore/issues/6616#issuecomment-789492298: > Well, EdgeHTML isn't going anywhere from what we know. It'd be interesting to see how much work would be needed to drop ChakraCore in to replace KJS in KHTML (yes, old, but open and provably can be extended into a modern browser). Also from @curtisman in https://github.com/chakra-core/ChakraCore/issues/6616#issuecomment-792391375: > ChakraCore should have most of what you need to run with modern browser. I did a quick hacky prototype that shim's v8 API (similar to the shim that enables node-chakra) and able to run Chromium with pretty good perf. Most of the additional code to wire up with any HTML engines deals with projecting the DOM into the JS context and memory management between the two sides. In my personal view this would be a very valuable experiment - running the engine inside of a browser unlocks a great variety of non-trivial workloads.
ChakraCore in a browser
https://api.github.com/repos/chakra-core/ChakraCore/issues/6622/comments
3
2021-03-15T07:56:27Z
2021-03-17T02:57:18Z
https://github.com/chakra-core/ChakraCore/issues/6622
831,531,914
6,622
[ "chakra-core", "ChakraCore" ]
Tests in the test suite that check debugger functionality using .dbg.baseline comparison functions auto-pass (or are skipped) when run on macos. This is frustrating when developing on mac as if a change causes some of these to fail it's not seen until you open a PR + have to update the PR to test the fix. Unsure what causes this - could be a `ch` error or a `runtests.py` error
Debugger tests that use .dbg.baseline files auto-pass on Mac
https://api.github.com/repos/chakra-core/ChakraCore/issues/6619/comments
0
2021-03-12T23:05:25Z
2021-03-20T02:06:48Z
https://github.com/chakra-core/ChakraCore/issues/6619
830,630,276
6,619
[ "chakra-core", "ChakraCore" ]
Please tell me the ECMAScript Spec. which the latest version of ChakraCore (v1.11.24) supported.
Supported ECMAScript Spec.
https://api.github.com/repos/chakra-core/ChakraCore/issues/6617/comments
2
2021-03-11T12:19:24Z
2021-04-03T15:23:41Z
https://github.com/chakra-core/ChakraCore/issues/6617
829,099,718
6,617
[ "chakra-core", "ChakraCore" ]
I've got a special question: Is it possible to build ChakraCore and replace chakra.dll on Windows to expose new features to PWA (and Edge Legacy)? I've read there are only a fiew differences between Chakra and ChakraCore? If it is: How could it be done?
Exposing new features by replacing chakra.dll with a ChakraCore build ?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6616/comments
19
2021-02-23T19:49:35Z
2021-09-04T20:50:49Z
https://github.com/chakra-core/ChakraCore/issues/6616
814,779,837
6,616