mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
GH-120982: Add stack check assertions to generated interpreter code (GH-120992)
This commit is contained in:
parent
42b2c9d78d
commit
8f5a01707f
8 changed files with 448 additions and 0 deletions
|
@ -246,6 +246,8 @@ GETITEM(PyObject *v, Py_ssize_t i) {
|
|||
#define STACK_SHRINK(n) BASIC_STACKADJ(-(n))
|
||||
#endif
|
||||
|
||||
#define WITHIN_STACK_BOUNDS() \
|
||||
(frame == &entry_frame || (STACK_LEVEL() >= 0 && STACK_LEVEL() <= STACK_SIZE()))
|
||||
|
||||
/* Data access macros */
|
||||
#define FRAME_CO_CONSTS (_PyFrame_GetCode(frame)->co_consts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue