Skip to content

memory leak observed in python 3.12.1 #579

Closed
@TheRealMcoy

Description

@TheRealMcoy

This library appears to leak memory in Unpacker method under Python 3.12.1

reproducer script:

import msgpack
from io import BytesIO

while True:

   buf = BytesIO()
   for i in range(100):
      buf.write(msgpack.packb(i, use_bin_type=True))

   buf.seek(0)

   unpacker = msgpack.Unpacker(buf, raw=False)
   for unpacked in unpacker:
       print(unpacked)

Python 3.11.7 after 10 minute run:
python3 11

Python 3.12.1 after 10 minute run:
python3 12

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