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
9 changes: 6 additions & 3 deletions src/coreclr/vm/jithelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2358,9 +2358,12 @@ NOINLINE static void JIT_ReversePInvokeEnterRare2(ReversePInvokeFrame* frame, vo
HCIMPL3_RAW(void, JIT_ReversePInvokeEnterTrackTransitions, ReversePInvokeFrame* frame, MethodDesc* pMD, void* secretArg)
{
_ASSERTE(frame != NULL && pMD != NULL);
_ASSERTE(!pMD->IsILStub() || secretArg != NULL);

if (pMD->IsILStub() && secretArg != NULL)
UMEntryThunk* pEntryThunk = NULL;
if (secretArg != NULL)
{
pEntryThunk = ((UMEntryThunkData*)secretArg)->m_pUMEntryThunk;
pMD = ((UMEntryThunkData*)secretArg)->m_pMD;
}
frame->pMD = pMD;
Expand All @@ -2387,14 +2390,14 @@ HCIMPL3_RAW(void, JIT_ReversePInvokeEnterTrackTransitions, ReversePInvokeFrame*
{
// If we're in an IL stub, we want to trace the address of the target method,
// not the next instruction in the stub.
JIT_ReversePInvokeEnterRare2(frame, _ReturnAddress(), pMD->IsILStub() ? ((UMEntryThunkData*)secretArg)->m_pUMEntryThunk : (UMEntryThunk*)NULL);
JIT_ReversePInvokeEnterRare2(frame, _ReturnAddress(), pEntryThunk);
}
}
else
{
// If we're in an IL stub, we want to trace the address of the target method,
// not the next instruction in the stub.
JIT_ReversePInvokeEnterRare(frame, _ReturnAddress(), pMD->IsILStub() ? ((UMEntryThunkData*)secretArg)->m_pUMEntryThunk : (UMEntryThunk*)NULL);
JIT_ReversePInvokeEnterRare(frame, _ReturnAddress(), pEntryThunk);
}

#if defined(TARGET_X86) && defined(TARGET_WINDOWS)
Expand Down
Loading