Skip to content

Commit 8c0507f

Browse files
fix assert
1 parent 1b3b922 commit 8c0507f

File tree

3 files changed

+1305
-1304
lines changed

3 files changed

+1305
-1304
lines changed

Python/ceval_macros.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,11 @@ GETITEM(PyObject *v, Py_ssize_t i) {
252252
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && STACK_LEVEL() <= STACK_SIZE()))
253253

254254
#if defined(Py_DEBUG) && !defined(_Py_JIT)
255-
#define WITHIN_STACK_BOUNDS_WITH_CACHE() \
256-
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && (STACK_LEVEL() + current_cached_values) <= STACK_SIZE()))
255+
// This allows temporary stack "overflows", provided it's all in the cache at any point of time.
256+
#define WITHIN_STACK_BOUNDS_IGNORING_CACHE() \
257+
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && (STACK_LEVEL()) <= STACK_SIZE()))
257258
#else
258-
#define WITHIN_STACK_BOUNDS_WITH_CACHE WITHIN_STACK_BOUNDS
259+
#define WITHIN_STACK_BOUNDS_IGNORING_CACHE WITHIN_STACK_BOUNDS
259260
#endif
260261

261262
/* Data access macros */

0 commit comments

Comments
 (0)