Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix typos
  • Loading branch information
markshannon committed Nov 18, 2025
commit b28b230f9fd7811552a2806399e31df41833ad49
4 changes: 2 additions & 2 deletions Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ static inline int _Py_MakeRecCheck(PyThreadState *tstate) {
// If it is below the hardware stack base, assume that we have the wrong stack limits, and do nothing.
// We could have the wrong stack limits becuase of limited platform support, or user-space threads.
Comment thread
markshannon marked this conversation as resolved.
Outdated
#if _Py_STACK_GROWS_DOWN
return here_addr < _tstate->c_stack_soft_limit && here_addr >= _tstate->c_stack_soft_limit - 2 * _PyOS_STACK_MARGIN_BYTES;;
return here_addr < _tstate->c_stack_soft_limit && here_addr >= _tstate->c_stack_soft_limit - 2 * _PyOS_STACK_MARGIN_BYTES;
#else
return here_addr > _tstate->c_stack_soft_limit && here_addr <= _tstate->c_stack_soft_limit + 2 * _PyOS_STACK_MARGIN_BYTES;;
return here_addr > _tstate->c_stack_soft_limit && here_addr <= _tstate->c_stack_soft_limit + 2 * _PyOS_STACK_MARGIN_BYTES;
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions InternalDocs/stack_protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Recursion checks are performed by `_Py_EnterRecursiveCall()` or `_Py_EnterRecurs

```python
kb_used = (stack_top - stack_pointer)>>10
if stack_pointer < bottom_of_machine_stack
pass # Our stack limts could be wrong so it is safest to do nothing.
if stack_pointer < bottom_of_machine_stack:
pass # Our stack limits could be wrong so it is safest to do nothing.
elif stack_pointer < hard_limit:
FatalError(f"Unrecoverable stack overflow (used {kb_used} kB)")
elif stack_pointer < soft_limit:
Expand Down
Loading