Skip to content

Commit

Permalink
Fix GC stackwalking for generic calli
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Mar 4, 2024
1 parent 413ace6 commit 39be930
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/classlibnative/bcltype/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExce
FindFailFastCallerStruct findCallerData;
findCallerData.pStackMark = stackMark;
findCallerData.retAddress = 0;
StackWalkFunctions(GetThread(), FindFailFastCallerCallback, &findCallerData);
GetThread()->StackWalkFrames(FindFailFastCallerCallback, &findCallerData, FUNCTIONSONLY | QUICKUNWIND);

// Managed code injected FailFast maps onto the unmanaged version
// (EEPolicy::HandleFatalError) in the following manner: the exit code is
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/eetwain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4406,10 +4406,10 @@ void promoteVarArgs(PTR_BYTE argsStart, PTR_VASigCookie varArgSig, GCCONTEXT* ct
{
WRAPPER_NO_CONTRACT;

//Note: no instantiations needed for varargs
SigTypeContext typeContext(varArgSig->classInst, varArgSig->methodInst);
MetaSig msig(varArgSig->signature,
varArgSig->pModule,
NULL);
&typeContext);

PTR_BYTE pFrameBase = argsStart - TransitionBlock::GetOffsetOfArgs();

Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/vm/frames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1364,10 +1364,10 @@ void TransitionFrame::PromoteCallerStack(promote_func* fn, ScanContext* sc)
{
VASigCookie *varArgSig = GetVASigCookie();

//Note: no instantiations needed for varargs
SigTypeContext typeContext(varArgSig->classInst, varArgSig->methodInst);
MetaSig msig(varArgSig->signature,
varArgSig->pModule,
NULL);
&typeContext);
PromoteCallerStackHelper (fn, sc, pFunction, &msig);
}
}
Expand Down Expand Up @@ -1498,10 +1498,10 @@ void TransitionFrame::PromoteCallerStackUsingGCRefMap(promote_func* fn, ScanCont
{
VASigCookie *varArgSig = dac_cast<PTR_VASigCookie>(*ppObj);

//Note: no instantiations needed for varargs
SigTypeContext typeContext(varArgSig->classInst, varArgSig->methodInst);
MetaSig msig(varArgSig->signature,
varArgSig->pModule,
NULL);
&typeContext);
PromoteCallerStackHelper (fn, sc, NULL, &msig);
}
break;
Expand All @@ -1525,10 +1525,10 @@ void PInvokeCalliFrame::PromoteCallerStack(promote_func* fn, ScanContext* sc)
return;
}

// no instantiations needed for varargs
SigTypeContext typeContext(varArgSig->classInst, varArgSig->methodInst);
MetaSig msig(varArgSig->signature,
varArgSig->pModule,
NULL);
&typeContext);
PromoteCallerStackHelper(fn, sc, NULL, &msig);
}

Expand Down

0 comments on commit 39be930

Please sign in to comment.