@@ -1418,9 +1418,6 @@ Thread::Thread()
14181418    m_CacheStackSufficientExecutionLimit = 0 ;
14191419    m_CacheStackStackAllocNonRiskyExecutionLimit = 0 ;
14201420
1421-     m_LastAllowableStackAddress= 0 ;
1422-     m_ProbeLimit = 0 ;
1423- 
14241421#ifdef  _DEBUG
14251422    m_pCleanedStackBase = NULL ;
14261423#endif 
@@ -1707,8 +1704,6 @@ BOOL Thread::InitThread()
17071704    if  (m_CacheStackBase == 0 )
17081705    {
17091706        _ASSERTE (m_CacheStackLimit == 0 );
1710-         _ASSERTE (m_LastAllowableStackAddress == 0 );
1711-         _ASSERTE (m_ProbeLimit == 0 );
17121707        ret = SetStackLimits (fAll );
17131708        if  (ret == FALSE )
17141709        {
@@ -6415,24 +6410,6 @@ BOOL Thread::SetStackLimits(SetStackLimitScope scope)
64156410    if  (FAILED (CLRSetThreadStackGuarantee ()))
64166411        return  FALSE ;
64176412
6418-     //  Cache the last stack addresses that we are allowed to touch.  We throw a stack overflow
6419-     //  if we cross that line.  Note that we ignore any subsequent calls to STSG for Whidbey until
6420-     //  we see an exception and recache the values.  We use the LastAllowableAddresses to
6421-     //  determine if we've taken a hard SO and the ProbeLimits on the probes themselves.
6422- 
6423-     m_LastAllowableStackAddress = GetLastNormalStackAddress ();
6424- 
6425-     if  (g_pConfig->ProbeForStackOverflow ())
6426-     {
6427-         m_ProbeLimit = m_LastAllowableStackAddress;
6428-     }
6429-     else 
6430-     {
6431-         //  If we have stack probing disabled, set the probeLimit to 0 so that all probes will pass.  This
6432-         //  way we don't have to do an extra check in the probe code.
6433-         m_ProbeLimit = 0 ;
6434-     }
6435- 
64366413    return  TRUE ;
64376414}
64386415
@@ -6685,34 +6662,6 @@ void Thread::DebugLogStackMBIs()
66856662}
66866663#endif  //  _DEBUG
66876664
6688- // 
6689- //  IsSPBeyondLimit
6690- // 
6691- //  Determines if the stack pointer is beyond the stack limit, in which case
6692- //  we can assume we've taken a hard SO.
6693- // 
6694- //  Parameters: none
6695- // 
6696- //  Returns: bool indicating if SP is beyond the limit or not
6697- // 
6698- BOOL Thread::IsSPBeyondLimit ()
6699- {
6700-     WRAPPER_NO_CONTRACT;
6701- 
6702-     //  Reset the stack limits if necessary.
6703-     //  @todo .  Add a vectored handler for X86 so that we reset the stack limits
6704-     //  there, as anything that supports SetThreadStackGuarantee will support vectored handlers.
6705-     //  Then we can always assume during EH processing that our stack limits are good and we
6706-     //  don't have to call ResetStackLimits.
6707-     ResetStackLimits ();
6708-     char  *approxSP = (char  *)GetCurrentSP ();
6709-     if   (approxSP < (char  *)(GetLastAllowableStackAddress ()))
6710-     {
6711-         return  TRUE ;
6712-     }
6713-     return  FALSE ;
6714- }
6715- 
67166665NOINLINE void  AllocateSomeStack (){
67176666    LIMITED_METHOD_CONTRACT;
67186667#ifdef  TARGET_X86
0 commit comments