FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: delete BaseObjectWeakPtr data when pointee is gone by addaleax · Pull Request #32393 · nodejs/node · GitHub

/ node Public

src: delete BaseObjectWeakPtr data when pointee is gone - #32393

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:base-object-weak-delete
Closed

src: delete BaseObjectWeakPtr data when pointee is gone#32393
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:base-object-weak-delete

Conversation

Copy link
Copy Markdown
Member

Fix the condition for deleting the underlying data pointed to by
a BaseObjectWeakPtr, which erroneously skipped that deletion
when ptr->get() was nullptr. This fixes a memory leak reported
by some of the tests.

Refs: #30374 (comment)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: nodejs#30374 (comment)
nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 20, 2020

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor

Can confirm, ASAN is happy with this!

nodejs-github-bot commented Mar 21, 2020
edited by addaleax
Loading

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/29964/ (:yellow_heart:)

addaleax added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Mar 21, 2020

Copy link
Copy Markdown
Contributor

Landed in 668bc11

mmarchini closed this Mar 23, 2020
mmarchini pushed a commit that referenced this pull request Mar 23, 2020
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: #30374 (comment)

PR-URL: #32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax deleted the base-object-weak-delete branch March 23, 2020 19:21
MylesBorins pushed a commit that referenced this pull request Mar 24, 2020
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: #30374 (comment)

PR-URL: #32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins mentioned this pull request Mar 24, 2020
MylesBorins pushed a commit that referenced this pull request Mar 24, 2020
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: #30374 (comment)

PR-URL: #32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit to addaleax/node that referenced this pull request Apr 1, 2020
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: nodejs#30374 (comment)

PR-URL: nodejs#32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 1, 2020
Fix the condition for deleting the underlying data pointed to by
a `BaseObjectWeakPtr`, which erroneously skipped that deletion
when `ptr->get()` was `nullptr`. This fixes a memory leak reported
by some of the tests.

Refs: #30374 (comment)

Backport-PR-URL: #32301
PR-URL: #32393
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
codebytere mentioned this pull request Apr 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL