8000 test long_dealloc as well · python/cpython@d89aa25 · GitHub
[go: up one dir, main page]

Skip to content

Commit d89aa25

Browse files
committed
test long_dealloc as well
1 parent b0992cd commit d89aa25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/longobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,18 +3646,18 @@ _PyLong_ExactDealloc(PyObject *self)
36463646
static void
36473647
long_dealloc(PyObject *self)
36483648
{
3649-
#ifndef Py_GIL_DISABLED
36503649
if (_long_is_small_int(self)) {
36513650
/* This should never get called, but we also don't want to SEGV if
36523651
* we accidentally decref small Ints out of existence. Instead,
36533652
* since small Ints are immortal, re-set the reference count.
36543653
*
36553654
* See PEP 683, section Accidental De-Immortalizing for details
36563655
*/
3656+
printf("rare event: dealloc of small int\n");
3657+
exit(1);
36573658
_Py_SetImmortal(self);
36583659
return;
36593660
}
3660-
#endif
36613661
if (PyLong_CheckExact(self) && _PyLong_IsCompact((PyLongObject *)self)) {
36623662
_Py_FREELIST_FREE(ints, self, PyObject_Free);
36633663
return;

0 commit comments

Comments
 (0)
0