Message411143
| Author |
vstinner |
| Recipients |
corona10, erlendaasland, petr.viktorin, phsilva, shihai1991, vstinner |
| Date |
2022年01月21日.16:31:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1642782680.58.0.628917370926.issue46417@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> bpo-46417: Revert remove_subclass() change (GH-30750)
Ok, this change fixed buildbots.
I saw code in typeobject.c which uses a borrowed reference to tp_subclasses with a loop which can modify tp_subclasses. This code should be modified to hold a strong reference to tp_subclasses while accessing it.
The test_mock_add_spec() test of test_unittest modifies the subclasses of many types and so is indirectly a stress tests for code accessing tp_subclasses. That's why the regression was only seen in this specific test. |
|