Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent memory leak when a recursive unpacker raises an exception #371

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

casperisfine
Copy link

@casperisfine casperisfine commented Nov 8, 2024

The child stack wouldn't be popped nor freed.

Additionally, even once the packer was freed, only the latest stack would be freed, all the parent stack would be leaked.

Practically speaking, every time a recursive unpacker would raise, 4kiB would be leaked.

@casperisfine
Copy link
Author

I need to check if perhaps we have a similar issue with recursive packers.

The child stack wouldn't be popped nor freed.

Additionally, even once the packer was freed, only the latest stack
would be freed, all the parent stack would be leaked.

Practically speaking, every time a recursive unpacker would raise,
4kiB would be leaked.
@byroot byroot merged commit 9bac145 into msgpack:master Nov 8, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants