Skip to content

[3.8] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020)#22046

Merged
pablogsal merged 1 commit intopython:3.8from
pablogsal:backport-87e91ae-3.8
Sep 1, 2020
Merged

[3.8] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020)#22046
pablogsal merged 1 commit intopython:3.8from
pablogsal:backport-87e91ae-3.8

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Sep 1, 2020

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 [email protected].
(cherry picked from commit 87e91ae)

Co-authored-by: Pablo Galindo [email protected]

https://bugs.python.org/issue41654

…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 <[email protected]>.
(cherry picked from commit 87e91ae)

Co-authored-by: Pablo Galindo <[email protected]>
@pablogsal pablogsal force-pushed the backport-87e91ae-3.8 branch from d1b534d to 5307a6d Compare September 1, 2020 19:23
@pablogsal pablogsal merged commit 77f4000 into python:3.8 Sep 1, 2020
@pablogsal pablogsal deleted the backport-87e91ae-3.8 branch September 1, 2020 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants