Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 0ffe499

Browse files
leirockschakrabot
authored andcommitted
deps: update ChakraCore to chakra-core/ChakraCore@fffb4e24be
[MERGE #4226 @leirocks] 17-11 Security Update Merge pull request #4226 from leirocks:1711-1 17-11 Security Update that addresses the following issues in ChakraCore CVE-2017-11791 CVE-2017-11836 CVE-2017-11837 CVE-2017-11838 CVE-2017-11840 CVE-2017-11841 CVE-2017-11843 CVE-2017-11846 CVE-2017-11858 CVE-2017-11861 CVE-2017-11862 CVE-2017-11870 CVE-2017-11871 CVE-2017-11873 CVE-2017-11874 CVE-2017-11866 CVE-2017-11859 Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
1 parent 473fb91 commit 0ffe499

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+577
-355
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.7.3
1+
1.7.4

deps/chakrashim/core/lib/Backend/Backend.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ enum IRDumpFlags
139139
#include "SymTable.h"
140140
#include "IR.h"
141141
#include "Opnd.h"
142+
#include "IntConstMath.h"
142143
#include "IntOverflowDoesNotMatterRange.h"
143144
#include "IntConstantBounds.h"
144145
#include "ValueRelativeOffset.h"

deps/chakrashim/core/lib/Backend/BackwardPass.cpp

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,8 +2047,8 @@ BackwardPass::ProcessBailOutInfo(IR::Instr * instr)
20472047
bool
20482048
BackwardPass::IsImplicitCallBailOutCurrentlyNeeded(IR::Instr * instr, bool mayNeedImplicitCallBailOut, bool hasLiveFields)
20492049
{
2050-
return this->globOpt->IsImplicitCallBailOutCurrentlyNeeded(
2051-
instr, nullptr, nullptr, this->currentBlock, hasLiveFields, mayNeedImplicitCallBailOut, false);
2050+
return this->globOpt->IsImplicitCallBailOutCurrentlyNeeded(instr, nullptr, nullptr, this->currentBlock, hasLiveFields, mayNeedImplicitCallBailOut, false) ||
2051+
this->NeedBailOutOnImplicitCallsForTypedArrayStore(instr);
20522052
}
20532053

20542054
void
@@ -2235,6 +2235,30 @@ BackwardPass::DeadStoreImplicitCallBailOut(IR::Instr * instr, bool hasLiveFields
22352235
}
22362236
}
22372237

2238+
bool
2239+
BackwardPass::NeedBailOutOnImplicitCallsForTypedArrayStore(IR::Instr* instr)
2240+
{
2241+
if ((instr->m_opcode == Js::OpCode::StElemI_A || instr->m_opcode == Js::OpCode::StElemI_A_Strict) &&
2242+
instr->GetDst()->IsIndirOpnd() &&
2243+
instr->GetDst()->AsIndirOpnd()->GetBaseOpnd()->GetValueType().IsLikelyTypedArray())
2244+
{
2245+
IR::Opnd * opnd = instr->GetSrc1();
2246+
if (opnd->IsRegOpnd())
2247+
{
2248+
return !opnd->AsRegOpnd()->GetValueType().IsPrimitive() &&
2249+
!opnd->AsRegOpnd()->m_sym->IsInt32() &&
2250+
!opnd->AsRegOpnd()->m_sym->IsFloat64() &&
2251+
!opnd->AsRegOpnd()->m_sym->IsFloatConst() &&
2252+
!opnd->AsRegOpnd()->m_sym->IsIntConst();
2253+
}
2254+
else
2255+
{
2256+
Assert(opnd->IsIntConstOpnd() || opnd->IsInt64ConstOpnd() || opnd->IsFloat32ConstOpnd() || opnd->IsFloatConstOpnd() || opnd->IsAddrOpnd());
2257+
}
2258+
}
2259+
return false;
2260+
}
2261+
22382262
void
22392263
BackwardPass::ProcessPendingPreOpBailOutInfo(IR::Instr *const currentInstr)
22402264
{

deps/chakrashim/core/lib/Backend/BackwardPass.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class BackwardPass
101101
void DeadStoreImplicitCallBailOut(IR::Instr * instr, bool hasLiveFields);
102102
void DeadStoreTypeCheckBailOut(IR::Instr * instr);
103103
bool IsImplicitCallBailOutCurrentlyNeeded(IR::Instr * instr, bool mayNeedImplicitCallBailOut, bool hasLiveFields);
104+
bool NeedBailOutOnImplicitCallsForTypedArrayStore(IR::Instr* instr);
104105
bool TrackNoImplicitCallInlinees(IR::Instr *instr);
105106
bool ProcessBailOnNoProfile(IR::Instr *instr, BasicBlock *block);
106107

deps/chakrashim/core/lib/Backend/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ add_library (Chakra.Backend OBJECT
3939
InliningDecider.cpp
4040
InliningHeuristics.cpp
4141
IntBounds.cpp
42+
IntConstMath.cpp
4243
InterpreterThunkEmitter.cpp
4344
JITThunkEmitter.cpp
4445
JITOutput.cpp

deps/chakrashim/core/lib/Backend/Chakra.Backend.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
<ClCompile Include="$(MSBuildThisFileDirectory)GlobOptBlockData.cpp" />
219219
<ClCompile Include="$(MSBuildThisFileDirectory)ValueInfo.cpp" />
220220
<ClCompile Include="$(MSBuildThisFileDirectory)JITThunkEmitter.cpp" />
221+
<ClCompile Include="$(MSBuildThisFileDirectory)IntConstMath.cpp" />
221222
</ItemGroup>
222223
<ItemGroup>
223224
<ClInclude Include="AgenPeeps.h" />
@@ -259,6 +260,7 @@
259260
<ClInclude Include="FunctionJITRuntimeInfo.h" />
260261
<ClInclude Include="FunctionJITTimeInfo.h" />
261262
<ClInclude Include="GlobOptBlockData.h" />
263+
<ClInclude Include="IntConstMath.h" />
262264
<ClInclude Include="IRBaseTypeList.h" />
263265
<ClInclude Include="IRBuilderAsmJs.h" />
264266
<ClInclude Include="BackendOpCodeAttrAsmJs.h" />

deps/chakrashim/core/lib/Backend/Chakra.Backend.vcxproj.filters

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
<ClCompile Include="$(MSBuildThisFileDirectory)GlobOptBlockData.cpp" />
131131
<ClCompile Include="$(MSBuildThisFileDirectory)ValueInfo.cpp" />
132132
<ClCompile Include="$(MSBuildThisFileDirectory)JITThunkEmitter.cpp" />
133+
<ClCompile Include="$(MSBuildThisFileDirectory)IntConstMath.cpp" />
133134
</ItemGroup>
134135
<ItemGroup>
135136
<ClInclude Include="AgenPeeps.h" />
@@ -345,6 +346,7 @@
345346
<ClInclude Include="GlobOptBlockData.h" />
346347
<ClInclude Include="ValueInfo.h" />
347348
<ClInclude Include="JITThunkEmitter.h" />
349+
<ClInclude Include="IntConstMath.h" />
348350
</ItemGroup>
349351
<ItemGroup>
350352
<MASM Include="$(MSBuildThisFileDirectory)amd64\LinearScanMdA.asm">

deps/chakrashim/core/lib/Backend/CodeGenAllocators.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include "Backend.h"
66

77
template<typename TAlloc, typename TPreReservedAlloc>
8-
CodeGenAllocators<TAlloc, TPreReservedAlloc>::CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext, CustomHeap::CodePageAllocators<TAlloc, TPreReservedAlloc> * codePageAllocators, HANDLE processHandle)
8+
CodeGenAllocators<TAlloc, TPreReservedAlloc>::CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext, ThreadContextInfo * threadContext, CustomHeap::CodePageAllocators<TAlloc, TPreReservedAlloc> * codePageAllocators, HANDLE processHandle)
99
: pageAllocator(policyManager, Js::Configuration::Global.flags, PageAllocatorType_BGJIT, 0)
1010
, allocator(_u("NativeCode"), &pageAllocator, Js::Throw::OutOfMemory)
11-
, emitBufferManager(&allocator, codePageAllocators, scriptContext, _u("JIT code buffer"), processHandle)
11+
, emitBufferManager(&allocator, codePageAllocators, scriptContext, threadContext, _u("JIT code buffer"), processHandle)
1212
#if !_M_X64_OR_ARM64 && _CONTROL_FLOW_GUARD
1313
, canCreatePreReservedSegment(false)
1414
#endif

deps/chakrashim/core/lib/Backend/CodeGenAllocators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CodeGenAllocators
1717
bool canCreatePreReservedSegment;
1818
#endif
1919

20-
CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext, CustomHeap::CodePageAllocators<TAlloc, TPreReservedAlloc> * codePageAllocators, HANDLE processHandle);
20+
CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext, ThreadContextInfo * threadContext, CustomHeap::CodePageAllocators<TAlloc, TPreReservedAlloc> * codePageAllocators, HANDLE processHandle);
2121
~CodeGenAllocators();
2222

2323
#if DBG

deps/chakrashim/core/lib/Backend/CodeGenWorkItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void CodeGenWorkItem::OnWorkItemProcessFail(NativeCodeGenerator* codeGen)
205205
#if DBG
206206
this->allocation->allocation->isNotExecutableBecauseOOM = true;
207207
#endif
208-
codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address, nullptr);
208+
codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address);
209209
}
210210
}
211211

0 commit comments

Comments
 (0)