mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
GH-127705: Add debug mode for _PyStackRef
s inspired by HPy debug mode (GH-128121)
This commit is contained in:
parent
78ffba4221
commit
128cc47fbd
12 changed files with 395 additions and 33 deletions
|
@ -34,6 +34,7 @@ extern "C" {
|
|||
#include "pycore_optimizer.h" // _PyOptimizerObject
|
||||
#include "pycore_obmalloc.h" // struct _obmalloc_state
|
||||
#include "pycore_qsbr.h" // struct _qsbr_state
|
||||
#include "pycore_stackref.h" // Py_STACKREF_DEBUG
|
||||
#include "pycore_tstate.h" // _PyThreadStateImpl
|
||||
#include "pycore_tuple.h" // struct _Py_tuple_state
|
||||
#include "pycore_uniqueid.h" // struct _Py_unique_id_pool
|
||||
|
@ -285,6 +286,11 @@ struct _is {
|
|||
_PyThreadStateImpl _initial_thread;
|
||||
// _initial_thread should be the last field of PyInterpreterState.
|
||||
// See https://github.com/python/cpython/issues/127117.
|
||||
|
||||
#if !defined(Py_GIL_DISABLED) && defined(Py_STACKREF_DEBUG)
|
||||
uint64_t next_stackref;
|
||||
_Py_hashtable_t *stackref_debug_table;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue