Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Preserve last error in call-counting stubs
Fixes #60819
  • Loading branch information
jkotas authored and github-actions committed Oct 26, 2021
commit 7847d1bd8bd5f60f213929eaf88b8f55e1ea78ca
20 changes: 10 additions & 10 deletions src/coreclr/vm/callcounting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,13 @@ extern "C" PCODE STDCALL OnCallCountThresholdReached(TransitionBlock *transition

PCODE CallCountingManager::OnCallCountThresholdReached(TransitionBlock *transitionBlock, TADDR stubIdentifyingToken)
{
CONTRACTL
{
THROWS;
GC_TRIGGERS;
MODE_COOPERATIVE;
PRECONDITION(CheckPointer(transitionBlock));
}
CONTRACTL_END;
STATIC_CONTRACT_THROWS;
STATIC_CONTRACT_GC_TRIGGERS;
STATIC_CONTRACT_MODE_COOPERATIVE;

PCODE codeEntryPoint;

BEGIN_PRESERVE_LAST_ERROR;

MAKE_CURRENT_THREAD_AVAILABLE();

Expand All @@ -740,8 +739,6 @@ PCODE CallCountingManager::OnCallCountThresholdReached(TransitionBlock *transiti
CallCountingHelperFrame *frame = &frameWithCookie;
frame->Push(CURRENT_THREAD);

PCODE codeEntryPoint;

INSTALL_MANAGED_EXCEPTION_DISPATCHER;
INSTALL_UNWIND_AND_CONTINUE_HANDLER;

Expand Down Expand Up @@ -786,6 +783,9 @@ PCODE CallCountingManager::OnCallCountThresholdReached(TransitionBlock *transiti
UNINSTALL_MANAGED_EXCEPTION_DISPATCHER;

frame->Pop(CURRENT_THREAD);

END_PRESERVE_LAST_ERROR;

return codeEntryPoint;
}

Expand Down