Issue 14211: Don't rely on borrowed _PyType_Lookup() reference in PyObject_GenericSetAttr() (original) (raw)
Issue14211
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/58419
classification
Title: | Don't rely on borrowed _PyType_Lookup() reference in PyObject_GenericSetAttr() | ||
---|---|---|---|
Type: | crash | Stage: | |
Components: | Interpreter Core | Versions: | Python 3.3 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | python-dev, vstinner | |
Priority: | normal | Keywords: | patch |
Created on 2012-03-06 17:19 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
type_lookup_ref.patch | vstinner,2012-03-06 17:19 | review |
Messages (3) | ||
---|---|---|
msg155025 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2012-03-06 17:19 |
PyObject_GenericSetAttr() doesn't keep a reference to the descriptor: Python does crash if the descriptor is destroyed while the attribute is set. Attached patch keeps a reference to the desriptor to avoid the crash. A smililar was done in PyObject_GenericGetAttr() 8 years with the changelog "fix obscure crash in descriptor handling", see the changeset 941d49a65f06. The patch fixes Lib/test/crashers/borrowed_ref_2.py and so removes it. | ||
msg155187 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2012-03-08 23:47 |
New changeset 579f845ac396 by Victor Stinner in branch 'default': Issue #14211: _PyObject_GenericSetAttrWithDict() keeps a strong reference to http://hg.python.org/cpython/rev/579f845ac396 | ||
msg155189 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2012-03-08 23:52 |
New changeset 2cc44cd8098e by Victor Stinner in branch 'default': Issue #14211: Oops, I removed the wrong file :-) http://hg.python.org/cpython/rev/2cc44cd8098e |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:27 | admin | set | github: 58419 |
2012-03-09 00:06:11 | vstinner | set | status: open -> closedresolution: fixed |
2012-03-08 23:52:34 | python-dev | set | messages: + |
2012-03-08 23:47:22 | python-dev | set | nosy: + python-devmessages: + |
2012-03-06 17:20:03 | vstinner | set | components: + Interpreter Coreversions: + Python 3.3 |
2012-03-06 17:19:56 | vstinner | set | type: crash |
2012-03-06 17:19:05 | vstinner | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements