File tree Expand file tree Collapse file tree
Modules/_remote_debugging Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,15 @@ static_assert(
4848 PY_REMOTE_ASYNC_DEBUG_OFFSETS_TOTAL_SIZE ,
4949 "Update _remote_debugging validation for _Py_AsyncioModuleDebugOffsets" );
5050
51+ /* Derive unexported offsets from adjacent fields to keep the debug-offset
52+ * table compatible across patch releases. */
53+ static_assert (offsetof(PyThreadState , exc_info ) ==
54+ offsetof(PyThreadState , current_exception ) + sizeof (uintptr_t ),
55+ "exc_info must immediately follow current_exception" );
56+ static_assert (offsetof(_PyErr_StackItem , previous_item ) ==
57+ offsetof(_PyErr_StackItem , exc_value ) + sizeof (uintptr_t ),
58+ "previous_item must immediately follow exc_value" );
59+
5160/*
5261 * This logic lives in a private header because it is shared by module.c and
5362 * asyncio.c. Keep the helpers static inline so they stay local to those users
Original file line number Diff line number Diff line change 2020/* Bound traversal of corrupted remote exception chains. */
2121#define MAX_EXCEPTION_CHAIN_DEPTH (2 << 15)
2222
23- /* Derive unexported offsets from adjacent fields to keep the debug-offset
24- * table compatible across patch releases. */
25- static_assert (offsetof(PyThreadState , exc_info ) ==
26- offsetof(PyThreadState , current_exception ) + sizeof (uintptr_t ),
27- "exc_info must immediately follow current_exception" );
28- static_assert (offsetof(_PyErr_StackItem , previous_item ) ==
29- offsetof(_PyErr_StackItem , exc_value ) + sizeof (uintptr_t ),
30- "previous_item must immediately follow exc_value" );
31-
3223/* ============================================================================
3324 * THREAD ITERATION FUNCTIONS
3425 * ============================================================================ */
You can’t perform that action at this time.
0 commit comments