Skip to content

Memory leak in tracemalloc #121390

Closed
Closed
@jbrobst

Description

@jbrobst

Bug report

Bug description:

The tracemalloc_tracebacks hash table has traceback keys and NULL values, but its destructors do not reflect this -- key_destroy_func is NULL while value_destroy_func is raw_free. The leaked traceback keys can be seen with AddressSanitizer:

./configure --with-pydebug --with-address-sanitizer
make -j "$(nproc)"
./python -X tracemalloc -c 'print("hello there")'

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions