cpython/Objects
Eric Snow 87e7cb09e4
gh-105699: Fix an Interned Strings Crasher (gh-106930)
A static (process-global) str object must only have its "interned" state cleared when no longer interned in any interpreters.  They are the only ones that can be shared by interpreters so we don't have to worry about any other str objects.

We trigger clearing the state with the main interpreter, since no other interpreters may exist at that point and _PyUnicode_ClearInterned() is only called during interpreter finalization.

We do not address here the fact that a string will only be interned in the first interpreter that interns it.  In any subsequent interpreters str.state.interned is already set so _PyUnicode_InternInPlace() will skip it.  That needs to be addressed separately from fixing the crasher.
2023-07-21 08:32:42 -06:00
..
clinic gh-106487: Allow the 'count' argument of str.replace to be a keyword (#106488) 2023-07-10 12:52:36 +03:00
stringlib gh-106320: Add pycore_complexobject.h header file (#106339) 2023-07-02 21:19:59 +00:00
abstract.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
boolobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
bytearrayobject.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
bytes_methods.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
bytesobject.c gh-105235: Prevent reading outside buffer during mmap.find() (#105252) 2023-07-12 22:50:45 -04:00
call.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
capsule.c gh-99537: Use Py_SETREF() function in C code (#99657) 2022-11-22 13:39:11 +01:00
cellobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99332) 2022-11-10 16:27:32 +01:00
classobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
codeobject.c Fix possible refleak in CodeType.replace() (GH-106243) 2023-06-29 17:22:15 +03:00
complexobject.c gh-106320: Add pycore_complexobject.h header file (#106339) 2023-07-02 21:19:59 +00:00
descrobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
dictnotes.txt bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) 2022-03-02 08:09:28 +09:00
dictobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
enumobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
exception_handling_notes.txt gh-96455: update example in exception_handling_notes.txt to the 3.11RC bytecode (GH-96456) 2022-09-01 14:21:39 +01:00
exceptions.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
fileobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
floatobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
frame_layout.md GH-96421: Insert shim frame on entry to interpreter (GH-96319) 2022-11-10 12:34:57 +00:00
frameobject.c gh-105340: include hidden fast-locals in locals() (#105715) 2023-07-05 17:05:02 -06:00
funcobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
genericaliasobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
genobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
interpreteridobject.c gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-105258) 2023-06-02 22:52:33 +00:00
iterobject.c gh-106084: Remove _PyObject_HasLen() function (#106103) 2023-06-26 13:02:43 +00:00
listobject.c gh-96844: Improve error message of list.remove (gh-106455) 2023-07-06 07:19:49 +09:00
listsort.txt Fix typos in the Objects directory (GH-28766) 2021-10-06 16:57:10 -07:00
lnotab_notes.txt bpo-44525: Split calls into PRECALL and CALL (GH-30011) 2021-12-14 18:22:44 +00:00
locations.md GH-88116: Use a compact format to represent end line and column offsets. (GH-91666) 2022-04-21 16:10:37 +01:00
longobject.c GH-101291: Add low level, unstable API for pylong (GH-101685) 2023-05-21 14:45:48 +01:00
memoryobject.c gh-104223: Fix issues with inheriting from buffer classes (#104227) 2023-05-08 09:52:41 -07:00
methodobject.c gh-106084: Remove _PyObject_CallMethod() function (#106159) 2023-06-28 01:34:37 +02:00
moduleobject.c gh-106719: Fix __annotations__ getter and setter in the type and module types (GH-106720) 2023-07-18 08:56:58 +03:00
namespaceobject.c gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530) 2022-11-16 18:34:24 +01:00
object.c gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522) 2023-07-11 22:13:27 +03:00
object_layout.md fix typos (#106247) 2023-06-30 13:00:22 +09:00
object_layout_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
obmalloc.c gh-106320: Remove private _PyErr C API functions (#106356) 2023-07-03 10:48:50 +00:00
odictobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
picklebufobject.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
rangeobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
README
setobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
sliceobject.c gh-103906: Remove immortal refcounting in compile/marshal.c (gh-103922) 2023-06-05 22:38:36 +09:00
structseq.c gh-106168: PyTuple_SET_ITEM() now checks the index (#106164) 2023-06-28 03:45:57 +02:00
tupleobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
typeobject.c gh-106719: Fix __annotations__ getter and setter in the type and module types (GH-106720) 2023-07-18 08:56:58 +03:00
typeslots.inc bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
typeslots.py bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
typevarobject.c gh-106403: Restore weakref support for TypeVar and friends (#106418) 2023-07-11 08:43:24 -07:00
unicodectype.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
unicodeobject.c gh-105699: Fix an Interned Strings Crasher (gh-106930) 2023-07-21 08:32:42 -06:00
unicodetype_db.h bpo-47243: Duplicate entry in 'Objects/unicodetype_db.h' (GH-32376) 2022-09-28 06:57:14 -07:00
unionobject.c gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
weakrefobject.c gh-105927: PyWeakref_GetRef() returns 1 on success (#106561) 2023-07-09 15:50:26 +00:00

Source files for various builtin objects