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

Crash on deleting ThreadSafeFunction #531

Closed
legendecas opened this issue Aug 29, 2019 · 1 comment
Closed

Crash on deleting ThreadSafeFunction #531

legendecas opened this issue Aug 29, 2019 · 1 comment

Comments

@legendecas
Copy link
Member

legendecas commented Aug 29, 2019

static Value Test(const CallbackInfo& info) {
  Object resource = info[0].As<Object>();
  Function cb = info[1].As<Function>();
  ThreadSafeFunction tsfn = ThreadSafeFunction::New(info.Env(), cb, resource, "Test", 1, 1);
  tsfn.Release();
  return info.Env().Undefined();
}

The case would have a great chance to crash with SIGABRT

node(67424,0x1078545c0) malloc: tiny_free_list_remove_ptr: Internal invariant broken (prev ptr of next): ptr=0x104842970, next_prev=0x0
node(67424,0x1078545c0) malloc: *** set a breakpoint in malloc_error_break to debug
legendecas added a commit to legendecas/node-addon-api that referenced this issue Aug 29, 2019
legendecas added a commit to legendecas/node-addon-api that referenced this issue Aug 29, 2019
legendecas added a commit to legendecas/node-addon-api that referenced this issue Sep 2, 2019
mhdawson pushed a commit that referenced this issue Sep 4, 2019
Refs: #531

PR-URL: #532
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
@NickNaso
Copy link
Member

NickNaso commented Sep 5, 2019

I'm closing the issue because the PR that fix it has been merged.

@NickNaso NickNaso closed this as completed Sep 5, 2019
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this issue Aug 24, 2022
Refs: nodejs/node-addon-api#531

PR-URL: nodejs/node-addon-api#532
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this issue Aug 26, 2022
Refs: nodejs/node-addon-api#531

PR-URL: nodejs/node-addon-api#532
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this issue Sep 19, 2022
Refs: nodejs/node-addon-api#531

PR-URL: nodejs/node-addon-api#532
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this issue Aug 11, 2023
Refs: nodejs/node-addon-api#531

PR-URL: nodejs/node-addon-api#532
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[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

No branches or pull requests

2 participants