Skip to content

Possible memory leak: bytes.Buffer grows unbounded in EncodeValue (upstream #322) #19

@xe-nvdk

Description

@xe-nvdk

Upstream: vmihailenco#322

EncodeValue uses bytes.Buffer internally which grows via makeSlice. When called repeatedly, the buffer grows exponentially and does not release memory, visible via pprof.

Note: Our pooled byteSliceWriter with the 32KB cap in PutEncoder() may partially address this for the Marshal() path. The streaming encoder path may still be affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-bugBug inherited from upstream vmihailenco/msgpack

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions