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

src: perf_hooks: fix wrong sized delete by ofrobots · Pull Request #16898 · nodejs/node · GitHub

/ node Public

src: perf_hooks: fix wrong sized delete - #16898

Merged
ofrobots merged 1 commit into
nodejs:masterfrom
ofrobots:perf-sized-delete
Nov 17, 2017
Merged

src: perf_hooks: fix wrong sized delete#16898
ofrobots merged 1 commit into
nodejs:masterfrom
ofrobots:perf-sized-delete

Conversation

ofrobots commented Nov 9, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Depending on the allocator, existing code leaks memory.

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

src: perf_hooks

CI: https://ci.nodejs.org/job/node-test-pull-request/11318/

nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 9, 2017
ofrobots requested a review from jasnell November 9, 2017 06:15
mscdex removed the v9.x label Nov 9, 2017

addaleax commented Nov 9, 2017
edited
Loading

Copy link
Copy Markdown
Member

I have no idea how Coverity tracks these things but is this maybe the reason for https://github.com/ofrobots/node/blob/59a012aeb976347d6975c82fb376b5db41da146c/src/node_perf.cc#L217 ?

Also, out of curiousity, on which systems was this noticeable?

Copy link
Copy Markdown
Contributor Author

@addaleax At Google we use sized deletes, which caught this once we upgraded to 8 LTS.

The coverity comment you point you to is possibly related to this, but /cc @bnoordhuis in case there was another reason to add it.

Copy link
Copy Markdown
Member

Not the same thing. leaked_storage is for when Coverity can't track where a heap allocation is freed.

Depending on the allocator, existing code leaks memory.

PR-URL: nodejs#16898
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
ofrobots merged commit d37789d into nodejs:master Nov 17, 2017
ofrobots deleted the perf-sized-delete branch November 17, 2017 01:22

Copy link
Copy Markdown
Contributor Author

Landed as d37789d.

MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
Depending on the allocator, existing code leaks memory.

PR-URL: #16898
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
MylesBorins mentioned this pull request Dec 12, 2017
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
Depending on the allocator, existing code leaks memory.

PR-URL: #16898
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
Depending on the allocator, existing code leaks memory.

PR-URL: #16898
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
gibfahn mentioned this pull request Dec 20, 2017
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

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.

9 participants


Back | FazBrowse Home | New Git URL