gh-123484: Fix the debug offsets for PyLongObject (#123485)

This commit is contained in:
Matt Wozniski 2024-08-30 07:39:28 -04:00 committed by GitHub
parent 103a0470e3
commit 7fca268bee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -117,8 +117,8 @@ extern PyTypeObject _PyExc_MemoryError;
}, \ }, \
.long_object = { \ .long_object = { \
.size = sizeof(PyLongObject), \ .size = sizeof(PyLongObject), \
.lv_tag = offsetof(_PyLongValue, lv_tag), \ .lv_tag = offsetof(PyLongObject, long_value.lv_tag), \
.ob_digit = offsetof(_PyLongValue, ob_digit), \ .ob_digit = offsetof(PyLongObject, long_value.ob_digit), \
}, \ }, \
.bytes_object = { \ .bytes_object = { \
.size = sizeof(PyBytesObject), \ .size = sizeof(PyBytesObject), \

View File

@ -0,0 +1,2 @@
Fix ``_Py_DebugOffsets`` for long objects to be relative to the start of the
object rather than the start of a subobject.