[issue42887] Multiple assignments of attribute "__sizeof__" will cause a segfault

Christian Heimes report at bugs.python.org
Mon Jan 11 03:06:17 EST 2021


Christian Heimes <lists at cheimes.de> added the comment:

I can reproduce the issue. The stack trace is several hundred thousand (!) levels deep.

#0  _Py_DECREF (op=<built-in method __sizeof__ of builtin_function_or_method object at remote 0x7fffe60703b0>, lineno=514, filename=0x6570af "./Include/object.h")
    at ./Include/object.h:448
#1  _Py_XDECREF (op=<built-in method __sizeof__ of builtin_function_or_method object at remote 0x7fffe60703b0>) at ./Include/object.h:514
#2  meth_dealloc (m=0x7fffe6070470) at Objects/methodobject.c:170
#3  0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#4  0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#5  _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#6  meth_dealloc (m=0x7fffe60704d0) at Objects/methodobject.c:170
#7  0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#8  0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#9  _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#10 meth_dealloc (m=0x7fffe6070530) at Objects/methodobject.c:170
#11 0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#12 0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#13 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#14 meth_dealloc (m=0x7fffe6070590) at Objects/methodobject.c:170
#15 0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#16 0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#17 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#18 meth_dealloc (m=0x7fffe60705f0) at Objects/methodobject.c:170
#19 0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#20 0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#21 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#22 meth_dealloc (m=0x7fffe6070650) at Objects/methodobject.c:170
...
#509737 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#509738 meth_dealloc (m=0x7fffe54ca6b0) at Objects/methodobject.c:170
#509739 0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#509740 0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#509741 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#509742 meth_dealloc (m=0x7fffe54ca710) at Objects/methodobject.c:170
#509743 0x0000000000466a99 in _Py_Dealloc (op=<optimized out>) at Objects/object.c:2209
#509744 0x00000000005da2fa in _Py_DECREF (op=<optimized out>, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448
#509745 _Py_XDECREF (op=<optimized out>) at ./Include/object.h:514
#509746 meth_dealloc (m=0x7fffe54ca770) at Objects/methodobject.c:170

...

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42887>
_______________________________________


More information about the Python-bugs-list mailing list