Skip to content

Crash on deleting ThreadSafeFunction #531

@legendecas

Description

@legendecas
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions