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.

Author vstinner
Recipients vstinner
Date 2012-03-06.17:19:04
SpamBayes Score 0.0001330634
Marked as misclassified No
Message-id <1331054345.96.0.65871889242.issue14211@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-06 17:19:06vstinnersetrecipients: + vstinner
2012-03-06 17:19:05vstinnersetmessageid: <1331054345.96.0.65871889242.issue14211@psf.upfronthosting.co.za>
2012-03-06 17:19:05vstinnerlinkissue14211 messages
2012-03-06 17:19:05vstinnercreate