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

tsfn: Remove erroneous finalizer cleanup #636

Closed
wants to merge 2 commits into from

Conversation

KevinEady
Copy link
Contributor

Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: #632

Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: nodejs#632
@KevinEady
Copy link
Contributor Author

This addresses leftover cleanup code from original implementation where tsfn was an std::unique_ptr. Not sure how to create tests for this or if they are needed...?

@averrez
Copy link

averrez commented Dec 16, 2019

Hi, just following up on the issue. Thanks for taking care of it!
One question - is it even necessary to store tsfn in the ThreadSafeFinalize struct? I don't see it referenced from anywhere and the way it is stored makes it unusable - it always points to already deallocated stack memory.

gabrielschulhof pushed a commit that referenced this pull request Dec 25, 2019
Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: #632
PR-URL: #636
Reviewed-By: Gabriel Schulhof <[email protected]>
@gabrielschulhof
Copy link
Contributor

Landed in 5eeabb0.

kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: nodejs/node-addon-api#632
PR-URL: nodejs/node-addon-api#636
Reviewed-By: Gabriel Schulhof <[email protected]>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: nodejs/node-addon-api#632
PR-URL: nodejs/node-addon-api#636
Reviewed-By: Gabriel Schulhof <[email protected]>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: nodejs/node-addon-api#632
PR-URL: nodejs/node-addon-api#636
Reviewed-By: Gabriel Schulhof <[email protected]>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
Removes leftover cleanup in finalizer that was part of the original TSFN
implementation.

Fixes: nodejs/node-addon-api#632
PR-URL: nodejs/node-addon-api#636
Reviewed-By: Gabriel Schulhof <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThreadSafeFunction memory violation in ThreadSafeFinalize
3 participants