Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 12 additions & 2 deletions src/coreclr/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3968,8 +3968,18 @@ CLR_BOOL SfiNextWorker(StackFrameIterator* pThis, uint* uExCollideClauseIdx, CLR
if (!doingFuncletUnwind)
{
#ifdef USE_GC_INFO_DECODER
GcInfoDecoder gcInfoDecoder(codeInfo.GetGCInfoToken(), DECODE_REVERSE_PINVOKE_VAR);
isPropagatingToNativeCode = gcInfoDecoder.GetReversePInvokeFrameStackSlot() != NO_REVERSE_PINVOKE_FRAME;
#ifdef FEATURE_INTERPRETER
if (codeInfo.GetCodeManager() == ExecutionManager::GetInterpreterCodeManager())
{
InterpreterGcInfoDecoder gcInfoDecoder(codeInfo.GetGCInfoToken(), DECODE_REVERSE_PINVOKE_VAR);
isPropagatingToNativeCode = gcInfoDecoder.GetReversePInvokeFrameStackSlot() != NO_REVERSE_PINVOKE_FRAME;
}
else
#endif // FEATURE_INTERPRETER
{
GcInfoDecoder gcInfoDecoder(codeInfo.GetGCInfoToken(), DECODE_REVERSE_PINVOKE_VAR);
isPropagatingToNativeCode = gcInfoDecoder.GetReversePInvokeFrameStackSlot() != NO_REVERSE_PINVOKE_FRAME;
}
#else // USE_GC_INFO_DECODER
hdrInfo *hdrInfoBody;
codeInfo.DecodeGCHdrInfo(&hdrInfoBody);
Expand Down
30 changes: 25 additions & 5 deletions src/coreclr/vm/gcenv.ee.common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,24 @@ bool FindFirstInterruptiblePointStateCB(
unsigned FindFirstInterruptiblePoint(CrawlFrame* pCF, unsigned offs, unsigned endOffs)
{
GCInfoToken gcInfoToken = pCF->GetGCInfoToken();
GcInfoDecoder gcInfoDecoder(gcInfoToken, DECODE_FOR_RANGES_CALLBACK);

FindFirstInterruptiblePointState state;
state.offs = offs;
state.endOffs = endOffs;
state.returnOffs = -1;

gcInfoDecoder.EnumerateInterruptibleRanges(&FindFirstInterruptiblePointStateCB, &state);
#ifdef FEATURE_INTERPRETER
if (pCF->GetCodeManager() == ExecutionManager::GetInterpreterCodeManager())
{
InterpreterGcInfoDecoder gcInfoDecoder(gcInfoToken, DECODE_FOR_RANGES_CALLBACK);
gcInfoDecoder.EnumerateInterruptibleRanges(&FindFirstInterruptiblePointStateCB, &state);
}
else
#endif // FEATURE_INTERPRETER
{
GcInfoDecoder gcInfoDecoder(gcInfoToken, DECODE_FOR_RANGES_CALLBACK);
gcInfoDecoder.EnumerateInterruptibleRanges(&FindFirstInterruptiblePointStateCB, &state);
}

return state.returnOffs;
}
Expand Down Expand Up @@ -132,9 +142,19 @@ bool SafeToReportGenericParamContext(CrawlFrame* pCF)

#else // USE_GC_INFO_DECODER

GcInfoDecoder gcInfoDecoder(pCF->GetGCInfoToken(),
DECODE_PROLOG_LENGTH);
UINT32 prologLength = gcInfoDecoder.GetPrologSize();
UINT32 prologLength;
#ifdef FEATURE_INTERPRETER
if (pCF->GetCodeManager() == ExecutionManager::GetInterpreterCodeManager())
{
InterpreterGcInfoDecoder gcInfoDecoder(pCF->GetGCInfoToken(), DECODE_PROLOG_LENGTH);
prologLength = gcInfoDecoder.GetPrologSize();
}
else
#endif // FEATURE_INTERPRETER
{
GcInfoDecoder gcInfoDecoder(pCF->GetGCInfoToken(), DECODE_PROLOG_LENGTH);
prologLength = gcInfoDecoder.GetPrologSize();
}
if (pCF->GetRelOffset() < prologLength)
{
return false;
Expand Down
Loading