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

zlib: fix memory leak for unused zlib instances #21607

Merged
merged 1 commit into from
Jul 3, 2018

Conversation

addaleax
Copy link
Member

An oversight in an earlier commit led to a memory leak
in the untypical situation that zlib instances are created
but never used, because zlib handles no longer started
out their life as weak handles.

The bug was introduced in bd20110.

Refs: #20455

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem. labels Jun 30, 2018
@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

addaleax commented Jul 1, 2018

Fixed up the test since it was failing on a few platforms, new CI: https://ci.nodejs.org/job/node-test-pull-request/15700/

An oversight in an earlier commit led to a memory leak
in the untypical situation that zlib instances are created
but never used, because zlib handles no longer started
out their life as weak handles.

The bug was introduced in bd20110.

Refs: nodejs#20455

PR-URL: nodejs#21607
Reviewed-By: Tobias Nießen <[email protected]>
@addaleax
Copy link
Member Author

addaleax commented Jul 3, 2018

Landed in 6e16ad7

@addaleax addaleax closed this Jul 3, 2018
@addaleax addaleax deleted the zlib-weak-by-default branch July 3, 2018 17:23
@addaleax addaleax merged commit 6e16ad7 into nodejs:master Jul 3, 2018
targos pushed a commit that referenced this pull request Jul 4, 2018
An oversight in an earlier commit led to a memory leak
in the untypical situation that zlib instances are created
but never used, because zlib handles no longer started
out their life as weak handles.

The bug was introduced in bd20110.

Refs: #20455

PR-URL: #21607
Reviewed-By: Tobias Nießen <[email protected]>
@targos targos mentioned this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants