Terry J. Reedy <tjre...@udel.edu> added the comment:

Xinmeng, to verify Ronald's explanation, run this instead

mystr  = "hello123"
for x in range(1000000):
    mystr = mystr.__sizeof__()
input('>')  # Hit Enter to continue.
del mystr   # Expect crash here.
input('<')  # And never get here.

----------
nosy: +terry.reedy
title: Multiple assignments of attribute "__sizeof__" will cause a segfault -> 
100000 assignments of .__sizeof__  cause a segfault on del

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42887>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to