Message351196
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:\a.py
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:08 | malin | set | recipients:
+ malin |
2019-09-05 11:14:08 | malin | set | messageid: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> |
2019-09-05 11:14:08 | malin | link | issue38037 messages |
2019-09-05 11:14:08 | malin | create | |
|