Author malin
Recipients malin
Date 2019-09-05.11:14:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Adding these two lines to /Objects/longobject.c will disable the "preallocated small integer pool":

    #define NSMALLPOSINTS  0
    #define NSMALLNEGINTS  0

Then run this reproduce code (attached):

    from enum import IntEnum
    import _signal

    class Handlers(IntEnum):
        A = _signal.SIG_DFL
        B = _signal.SIG_IGN

When the interpreter exits, will get this error:

    d:\dev\cpython\PCbuild\win32>python_d.exe d:\
    d:\dev\cpython\include\object.h:541: _Py_NegativeRefcount: Assertion failed: object has negative ref count
    <object: freed>
    Fatal Python error: _PyObject_AssertFailed

    Current thread 0x0000200c (most recent call first):

3.8 and 3.9 branches are affected.
I'm sorry, this issue is beyond my ability.
Date User Action Args
2019-09-05 11:14:08malinsetrecipients: + malin
2019-09-05 11:14:08malinsetmessageid: <>
2019-09-05 11:14:08malinlinkissue38037 messages
2019-09-05 11:14:08malincreate