Skip to content

Commit

Permalink
try to make asan happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Jan 17, 2025
1 parent 6f1b821 commit 0edf469
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/objstore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Value PyObjectWrap::NewCallable(Napi::Env env, PyStrongRef &&py) {
// Skip if Python has been shut down
// Refer to the comment in PyObject::~PyObject about https://github.com/nodejs/node/issues/45088
if (active_environments == 0) {
// This is only for ASAN
delete fini_fn;
VERBOSE(INIT, "Funcstore erase running after the environment cleanup: %p\n", fini_py);
return;
}
Expand All @@ -111,6 +113,7 @@ Value PyObjectWrap::NewCallable(Napi::Env env, PyStrongRef &&py) {
VERBOSE_PYOBJ(CALL, fini_py, "Funcstore already erased");
}
delete fini_fn;
printf("Function finalized %p\n", fini_fn);
},
jsRef,
*py);
Expand Down

0 comments on commit 0edf469

Please sign in to comment.