Skip to content

Commit dc3eb04

Browse files
committed
Fix another stack assert on HP-PA (pythonGH-140028)
Missed in pythonGH-139914, as it was introduced around the same time and is only relevant to pydebug builds.
1 parent 521fb36 commit dc3eb04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,11 @@ tstate_set_stack(PyThreadState *tstate,
496496
uintptr_t base, uintptr_t top)
497497
{
498498
assert(base < top);
499+
#if _Py_STACK_GROWS_DOWN
499500
assert((top - base) >= _PyOS_MIN_STACK_SIZE);
501+
#else
502+
assert((base - top) >= _PyOS_MIN_STACK_SIZE);
503+
#endif
500504

501505
#ifdef _Py_THREAD_SANITIZER
502506
// Thread sanitizer crashes if we use more than half the stack.

0 commit comments

Comments
 (0)