mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
For debug build, check that the stack pointer never exceeds the stack size.
This commit is contained in:
parent
93a569d634
commit
14368158c2
1 changed files with 3 additions and 1 deletions
|
@ -542,7 +542,9 @@ eval_frame(PyFrameObject *f)
|
|||
#define BASIC_POP() (*--stack_pointer)
|
||||
|
||||
#ifdef LLTRACE
|
||||
#define PUSH(v) (void)(BASIC_PUSH(v), lltrace && prtrace(TOP(), "push"))
|
||||
#define PUSH(v) { (void)(BASIC_PUSH(v), \
|
||||
lltrace && prtrace(TOP(), "push")); \
|
||||
assert(STACK_LEVEL() <= f->f_stacksize); }
|
||||
#define POP() ((void)(lltrace && prtrace(TOP(), "pop")), BASIC_POP())
|
||||
#else
|
||||
#define PUSH(v) BASIC_PUSH(v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue