◐ Shell
clean mode source ↗

[3.8] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) by pablogsal · Pull Request #22046 · python/cpython

…subclasses (pythonGH-22020)

When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a9)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>