summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wozniski <mwozniski@bloomberg.net>2024-08-30 11:39:28 (GMT)
committerGitHub <noreply@github.com>2024-08-30 11:39:28 (GMT)
commit7fca268beee8ed13a8f161f0a0d5e21ff52d1ac1 (patch)
treed7faa5fc24055f5e3b513add9c1e68744373cf89
parent103a0470e31d80d56097f57a27d97d7d2d3c9fbb (diff)
downloadcpython-7fca268beee8ed13a8f161f0a0d5e21ff52d1ac1.zip
cpython-7fca268beee8ed13a8f161f0a0d5e21ff52d1ac1.tar.gz
cpython-7fca268beee8ed13a8f161f0a0d5e21ff52d1ac1.tar.bz2
gh-123484: Fix the debug offsets for PyLongObject (#123485)
-rw-r--r--Include/internal/pycore_runtime_init.h4
-rw-r--r--Misc/NEWS.d/next/Core_and_Builtins/2024-08-29-19-46-07.gh-issue-123484.rjUn_F.rst2
2 files changed, 4 insertions, 2 deletions
diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h
index 1746bbf..e6adb98 100644
--- a/Include/internal/pycore_runtime_init.h
+++ b/Include/internal/pycore_runtime_init.h
@@ -117,8 +117,8 @@ extern PyTypeObject _PyExc_MemoryError;
}, \
.long_object = { \
.size = sizeof(PyLongObject), \
- .lv_tag = offsetof(_PyLongValue, lv_tag), \
- .ob_digit = offsetof(_PyLongValue, ob_digit), \
+ .lv_tag = offsetof(PyLongObject, long_value.lv_tag), \
+ .ob_digit = offsetof(PyLongObject, long_value.ob_digit), \
}, \
.bytes_object = { \
.size = sizeof(PyBytesObject), \
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-08-29-19-46-07.gh-issue-123484.rjUn_F.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-08-29-19-46-07.gh-issue-123484.rjUn_F.rst
new file mode 100644
index 0000000..3062e36
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-08-29-19-46-07.gh-issue-123484.rjUn_F.rst
@@ -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.