Skip to content

zlib: fix memory leak for unused zlib instances - #21607

Merged
addaleax merged 1 commit into
nodejs:masterfrom
addaleax:zlib-weak-by-default
Jul 3, 2018
Merged

zlib: fix memory leak for unused zlib instances#21607
addaleax merged 1 commit into
nodejs:masterfrom
addaleax:zlib-weak-by-default

Conversation

@addaleax

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-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
Copy Markdown
MemberAuthor

@addaleax

Copy link
Copy Markdown
MemberAuthor

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 <tniessen@tnie.de>
@addaleax
addaleaxforce-pushed the zlib-weak-by-default branch from 8c512a7 to 6e16ad7CompareJuly 3, 2018 17:23
@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in 6e16ad7

@addaleaxaddaleax 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:masterJul 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 <tniessen@tnie.de>
@targostargos mentioned this pull request Jul 17, 2018
Sign up for freeto 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++.zlibIssues and PRs related to the zlib subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@addaleax@nodejs-github-bot@tniessen