◐ Shell
clean mode source ↗

bpo-41654: Fix deallocator of MemoryError to account for subclasses by pablogsal · Pull Request #22020 · python/cpython

shihai1991

vstinner

sweeneyde

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.

vstinner

vstinner

shihai1991

shihai1991

@pablogsal

pablogsal added a commit to pablogsal/cpython that referenced this pull request

Sep 1, 2020
…sses (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>

pablogsal added a commit to pablogsal/cpython that referenced this pull request

Sep 1, 2020
…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>

pablogsal added a commit that referenced this pull request

Sep 1, 2020
…subclasses (GH-22020) (GH-22046)

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>

pablogsal added a commit that referenced this pull request

Sep 1, 2020
…sses (GH-22020) (GH-22045)

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>

xzy3 pushed a commit to xzy3/cpython that referenced this pull request

Oct 18, 2020
…ythonGH-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.