This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author WildCard65
Recipients WildCard65, christian.heimes, ronaldoussoren, terry.reedy, xxm
Date 2021-01-16.04:25:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610771141.49.0.237009457684.issue42887@roundup.psfhosted.org>
In-reply-to
Content
Jumping in here to explain why '__class' doesn't crash when '__sizeof__' does:

When '__class__' is fetched, it returns a new reference to the object's type.

When '__sizeof__' is fetched on the otherhand, a new object is allocated on the heap ('types.MethodType') and is returned to the caller.

This object also has a '__sizeof__' that does the same (as it's implemented on 'object'.

So yes, you are exhausting the C runtime stack by de-allocating over a THOUSAND objects.

You can see this happen by watching the memory usage of Python steadily climb.
History
Date User Action Args
2021-01-16 04:25:41WildCard65setrecipients: + WildCard65, terry.reedy, ronaldoussoren, christian.heimes, xxm
2021-01-16 04:25:41WildCard65setmessageid: <1610771141.49.0.237009457684.issue42887@roundup.psfhosted.org>
2021-01-16 04:25:41WildCard65linkissue42887 messages
2021-01-16 04:25:41WildCard65create