mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
gh-110481: Fix Py_SET_REFCNT() integer overflow (#112174)
If Py_NOGIL is defined and Py_SET_REFCNT() is called with a reference count larger than UINT32_MAX, make the object immortal. Set _Py_IMMORTAL_REFCNT constant type to Py_ssize_t to fix the following compiler warning: Include/internal/pycore_global_objects_fini_generated.h:14:24: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned int' [-Wsign-compare] if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) { ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
c2982380f8
commit
5f6ac2d88a
3 changed files with 26 additions and 10 deletions
|
@ -287,6 +287,8 @@ General Options
|
|||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
.. _free-threading-build:
|
||||
|
||||
.. option:: --disable-gil
|
||||
|
||||
Enables **experimental** support for running Python without the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue