While migrating our codebase from python 3.7 to python 3.8, one of our unit tests segfaulted and I’ve narrowed it down to the change of typeobject.c in:
commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3
Author: Jeroen Demeyer <J.Demeyer@UGent.be>
Date: Fri May 10 19:21:11 2019 +0200
bpo-35983: skip trashcan for subclasses (GH-11841)
It seems that Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible (as claimed in the comment above their definition in object.h).
This patch has a unit test that currently fails, along with the change in typeobject.c that restores the code that broke it:
https://github.com/iritkatriel/cpython/commit/d962dd7f800fdaaeacd5748c6e3d38bf1f5053c1
I believe that this change needs to be pushed until the Py_TRASHCAN_SAFE_BEGIN/END are removed and all users are forced to migrate to the new Py_TRASHCAN_BEGIN/END. |