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

n-api: fix use-after-free with napi_remove_async_cleanup_hook #34662

Closed
wants to merge 3 commits into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Aug 7, 2020

Fixes: #34657
Refs: #34572

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • 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++. node-api Issues and PRs related to the Node-API. labels Aug 7, 2020
Only decrease the size when actually removing items.
This allows using `SetImmediate()` and friends at any point
during cleanup.
@gabrielschulhof gabrielschulhof added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 7, 2020
@gabrielschulhof
Copy link
Contributor

Shall we fast-track, given that this is breaking the CI?

@nodejs-github-bot
Copy link
Collaborator

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 7, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Aug 7, 2020

jasnell pushed a commit that referenced this pull request Aug 7, 2020
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jasnell pushed a commit that referenced this pull request Aug 7, 2020
This allows using `SetImmediate()` and friends at any point
during cleanup.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jasnell pushed a commit that referenced this pull request Aug 7, 2020
Fixes: #34657
Refs: #34572

PR-URL: #34662
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

jasnell commented Aug 7, 2020

Landed in 9511261, 09c5942, and 262d0d0

@jasnell jasnell closed this Aug 7, 2020
addaleax added a commit that referenced this pull request Aug 8, 2020
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Aug 8, 2020
This allows using `SetImmediate()` and friends at any point
during cleanup.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Aug 8, 2020
Fixes: #34657
Refs: #34572

PR-URL: #34662
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Aug 10, 2020
codebytere pushed a commit that referenced this pull request Aug 11, 2020
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Aug 11, 2020
This allows using `SetImmediate()` and friends at any point
during cleanup.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Aug 11, 2020
Fixes: #34657
Refs: #34572

PR-URL: #34662
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
This allows using `SetImmediate()` and friends at any point
during cleanup.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
Only decrease the size when actually removing items.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
This allows using `SetImmediate()` and friends at any point
during cleanup.

PR-URL: #34662
Fixes: #34657
Refs: #34572
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
Fixes: #34657
Refs: #34572

PR-URL: #34662
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
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 pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASAN tests failing
4 participants