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 anthony shaw
Recipients Aaron Hall, anthony shaw, methane, ncoghlan, ronaldoussoren, serhiy.storchaka
Date 2019-04-08.11:36:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554723417.93.0.539341851135.issue36551@roundup.psfhosted.org>
In-reply-to
Content
> This might cause a MemoryError when the __length_hint__ of the source returns a too large value, even when the actual size of the comprehension is smaller, e.g.:

The current implementation of list comprehensions raise neither a memoryerror or overflow error. They will consume all available memory and crash the interpreter.

This patch raises an OverflowError before execution instead of just looping until memory heap exhaustion
History
Date User Action Args
2019-04-08 11:36:57anthony shawsetrecipients: + anthony shaw, ronaldoussoren, ncoghlan, methane, serhiy.storchaka, Aaron Hall
2019-04-08 11:36:57anthony shawsetmessageid: <1554723417.93.0.539341851135.issue36551@roundup.psfhosted.org>
2019-04-08 11:36:57anthony shawlinkissue36551 messages
2019-04-08 11:36:57anthony shawcreate