Skip to content

Memory Leak in ZSTD_compressStream2_wrapper #157

@ruhi-chaddha

Description

@ruhi-chaddha

Running tests with AddressSanitizer (ASan) enabled reveals a memory leak when using the zstd.Writer or a streaming compression method. The leak appears to be within the underlying C-allocated context which is not being properly freed by the Go wrapper's cleanup logic, even when the Close() method is explicitly called.

The leak is tracked back to a malloc call within the core Zstandard C library, typically associated with the stream's internal compression context (ZSTD_CCtx*).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions