Skip to content

Memory leak if math.dist raises exception #98897

Description

@kumaraditya303

Reproducer:

import math
try:
    math.dist([1, 2], [3, 4, 5])
except ValueError:
    pass

Memory leak:

@kumaraditya303 ➜ /workspaces/cpython (main ✗) $ ./python -X showrefcount main.py 
[7 refs, 2 blocks]

Python Version: main at 9bdec0a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.10only security fixes3.11only security fixes3.12only security fixeseasytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions