Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Skip scanning untracked frame variables
Browse files Browse the repository at this point in the history
When scanning the stack roots
it skips scanning untracked frame variables for funclets
  • Loading branch information
wateret committed Mar 20, 2017
1 parent e418834 commit 59b57d9
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions src/vm/eetwain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4249,18 +4249,6 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext,

#endif // _DEBUG

#ifdef WIN64EXCEPTIONS // funclets
//
// If we're in a funclet, we do not want to report the incoming varargs. This is
// taken care of by the parent method and the funclet should access those arguments
// by way of the parent method's stack frame.
//
if(pCodeInfo->IsFunclet())
{
return true;
}
#endif // WIN64EXCEPTIONS

/* What kind of a frame is this ? */

FrameType frameType = FR_NORMAL;
Expand Down Expand Up @@ -4598,6 +4586,18 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext,
unsigned ptrAddr;
unsigned lowBits;

#ifdef WIN64EXCEPTIONS
if (pCodeInfo->IsFunclet())
{
count = info.untrackedCnt;
while (count-- > 0)
{
fastSkipSigned(table);
}
}
else
#endif
{

/* Process the untracked frame variable table */

Expand Down Expand Up @@ -4657,6 +4657,8 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext,
true)));
}

}

#if VERIFY_GC_TABLES
_ASSERTE(*castto(table, unsigned short *)++ == 0xCAFE);
#endif
Expand Down Expand Up @@ -4764,6 +4766,18 @@ bool EECodeManager::EnumGcRefs( PREGDISPLAY pContext,
_ASSERTE(*castto(table, unsigned short *)++ == 0xBABE);
#endif

#ifdef WIN64EXCEPTIONS // funclets
//
// If we're in a funclet, we do not want to report the incoming varargs. This is
// taken care of by the parent method and the funclet should access those arguments
// by way of the parent method's stack frame.
//
if(pCodeInfo->IsFunclet())
{
return true;
}
#endif // WIN64EXCEPTIONS

/* Are we a varargs function, if so we have to report all args
except 'this' (note that the GC tables created by the x86 jit
do not contain ANY arguments except 'this' (even if they
Expand Down

0 comments on commit 59b57d9

Please sign in to comment.