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

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@c50dfa8d83
Browse files Browse the repository at this point in the history
[1.8>1.9] [MERGE #4661 @agarwal-sandeep] OS#15659337: Try to allocate JIT code in PreReservedSegment even if CFG is not enabled

Merge pull request #4661 from agarwal-sandeep:vso15659337

This speeds up stack walking IsNativeAddress checks when CFG is not enabled.

Reviewed-By: chakrabot <[email protected]>
  • Loading branch information
agarwal-sandeep authored and kfarnung committed Mar 7, 2018
1 parent 81dbf99 commit a73e86e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions deps/chakrashim/core/lib/Backend/Func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,8 +1144,7 @@ bool Func::CanAllocInPreReservedHeapPageSegment ()
{
#ifdef _CONTROL_FLOW_GUARD
return PHASE_FORCE1(Js::PreReservedHeapAllocPhase) || (!PHASE_OFF1(Js::PreReservedHeapAllocPhase) &&
!IsJitInDebugMode() && GetThreadContextInfo()->IsCFGEnabled()
//&& !GetScriptContext()->IsScriptContextInDebugMode()
!IsJitInDebugMode()
#if _M_IX86
&& m_workItem->GetJitMode() == ExecutionMode::FullJit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ LPVOID PreReservedSectionAllocWrapper::AllocPages(LPVOID lpAddress, DECLSPEC_GUA
size_t dwSize = pageCount * AutoSystemInfo::PageSize;

AssertMsg(isCustomHeapAllocation, "PreReservation used for allocations other than CustomHeap?");
AssertMsg(AutoSystemInfo::Data.IsCFGEnabled() || PHASE_FORCE1(Js::PreReservedHeapAllocPhase), "PreReservation without CFG ?");

Assert(dwSize != 0);

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ LPVOID PreReservedVirtualAllocWrapper::AllocPages(LPVOID lpAddress, size_t pageC
size_t dwSize = pageCount * AutoSystemInfo::PageSize;

AssertMsg(isCustomHeapAllocation, "PreReservation used for allocations other than CustomHeap?");
AssertMsg(AutoSystemInfo::Data.IsCFGEnabled() || PHASE_FORCE1(Js::PreReservedHeapAllocPhase), "PreReservation without CFG ?");

Assert(dwSize != 0);

{
Expand Down

0 comments on commit a73e86e

Please sign in to comment.