Skip to content

Commit a44ff07

Browse files
committed
[MERGE #6491 @akroshg] ChakraCore Servicing update for 2020.08B
Merge pull request #6491 from akroshg:servicing_2008 [CVE-2020-1555]
2 parents 75d5a92 + 28a1f06 commit a44ff07

File tree

8 files changed

+18
-6
lines changed

8 files changed

+18
-6
lines changed

Build/NuGet/.pack-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.20
1+
1.11.21

lib/Common/ChakraCoreVersion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// ChakraCore version number definitions (used in ChakraCore binary metadata)
1818
#define CHAKRA_CORE_MAJOR_VERSION 1
1919
#define CHAKRA_CORE_MINOR_VERSION 11
20-
#define CHAKRA_CORE_PATCH_VERSION 20
20+
#define CHAKRA_CORE_PATCH_VERSION 21
2121
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0 // Redundant with PATCH_VERSION. Keep this value set to 0.
2222

2323
// -------------

lib/Runtime/Base/FunctionBody.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6283,7 +6283,7 @@ namespace Js
62836283
Assert(polymorphicInlineCache && polymorphicInlineCache->CanAllocateBigger());
62846284
uint16 polymorphicInlineCacheSize = polymorphicInlineCache->GetSize();
62856285
uint16 newPolymorphicInlineCacheSize = PolymorphicInlineCache::GetNextSize(polymorphicInlineCacheSize);
6286-
Assert(newPolymorphicInlineCacheSize > polymorphicInlineCacheSize);
6286+
AssertOrFailFast(newPolymorphicInlineCacheSize > polymorphicInlineCacheSize);
62876287
PolymorphicInlineCache * newPolymorphicInlineCache = CreatePolymorphicInlineCache(index, newPolymorphicInlineCacheSize);
62886288
polymorphicInlineCache->CopyTo(propertyId, m_scriptContext, newPolymorphicInlineCache);
62896289
#ifdef ENABLE_DEBUG_CONFIG_OPTIONS

lib/Runtime/Language/CacheOperators.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Js
1818
bool IsAccessor,
1919
bool IsRead,
2020
bool IncludeTypePropertyCache>
21-
static void Cache(const bool isProto, DynamicObject *const objectWithProperty, const bool isRoot, Type *const type, Type *const typeWithoutProperty, const PropertyId propertyId, const PropertyIndex propertyIndex, const bool isInlineSlot, const bool isMissing, const int requiredAuxSlotCapacity, const PropertyValueInfo *const info, ScriptContext *const requestContext);
21+
static void Cache(const bool isProto, DynamicObject *const objectWithProperty, const bool isRoot, Type *const type, Type *const typeWithoutProperty, const PropertyId propertyId, const PropertyIndex propertyIndex, const bool isInlineSlot, const bool isMissing, const int requiredAuxSlotCapacity, PropertyValueInfo *const info, ScriptContext *const requestContext);
2222

2323
template<
2424
bool CheckLocal,

lib/Runtime/Language/CacheOperators.inl

+4-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ namespace Js
312312
const bool isInlineSlot,
313313
const bool isMissing,
314314
const int requiredAuxSlotCapacity,
315-
const PropertyValueInfo *const info,
315+
PropertyValueInfo *const info,
316316
ScriptContext *const requestContext)
317317
{
318318
CompileAssert(!IsAccessor || !IncludeTypePropertyCache);
@@ -375,6 +375,9 @@ namespace Js
375375
: !PHASE_OFF1(Js::TypePropertyCachePhase)
376376
);
377377
bool createTypePropertyCache = false;
378+
379+
// Side-effects may have changed the cache, so make sure the info has the latest.
380+
info->UpdatePolymorphicInlineCache(IsRead);
378381
PolymorphicInlineCache *polymorphicInlineCache = info->GetPolymorphicInlineCache();
379382
if(!polymorphicInlineCache && info->GetFunctionBody())
380383
{

lib/Runtime/Types/RecyclableObject.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ namespace Js
109109
}
110110
}
111111

112+
void PropertyValueInfo::UpdatePolymorphicInlineCache(bool isRead)
113+
{
114+
if (GetPropertyRecordUsageCache())
115+
{
116+
this->polymorphicInlineCache = isRead ? GetPropertyRecordUsageCache()->GetLdElemInlineCache() : GetPropertyRecordUsageCache()->GetStElemInlineCache();
117+
}
118+
}
119+
112120
#if DBG || defined(PROFILE_TYPES)
113121
// Used only by the GlobalObject, because it's typeHandler can't be fully initialized
114122
// with the globalobject which is currently being created.

lib/Runtime/Types/RecyclableObject.h

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ namespace Js {
9393
bool allowResizing);
9494
static void SetCacheInfo(_Out_ PropertyValueInfo* info, _In_ PolymorphicInlineCache *const polymorphicInlineCache, bool allowResizing);
9595
static void ClearCacheInfo(PropertyValueInfo* info);
96+
void UpdatePolymorphicInlineCache(bool isRead);
9697

9798
InlineCache * GetInlineCache() const
9899
{

test/AsmJs/rlexe.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@
977977
<compile-flags>-testtrace:asmjs -args 14000 -endargs -EnableFatalErrorOnOOM-</compile-flags>
978978
<!-- todo:: On unix platforms there is more stack available,
979979
so we need to find the right limit to test in order to not timeout -->
980-
<tags>exclude_dynapogo,exclude_mac</tags>
980+
<tags>exclude_dynapogo,exclude_mac,Slow</tags>
981981
</default>
982982
</test>
983983
<test>

0 commit comments

Comments
 (0)