-
Notifications
You must be signed in to change notification settings - Fork 187
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
It's possible for Luv to call into Lua with an unusable state (i.e. during lua_close) #437
Comments
zhaozg
added a commit
to zhaozg/luv
that referenced
this issue
May 26, 2023
zhaozg
added a commit
to zhaozg/luv
that referenced
this issue
May 26, 2023
zhaozg
added a commit
to zhaozg/luv
that referenced
this issue
May 26, 2023
zhaozg
added a commit
to zhaozg/luv
that referenced
this issue
May 26, 2023
zhaozg
added a commit
to zhaozg/luv
that referenced
this issue
May 26, 2023
Partially addressed by #654. See #654 (review) for what's left to do for this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See #414 and #436.
This is a more general problem than I thought. There are two things here:
luv/src/handle.c
Lines 116 to 127 in ab4a9ad
Running the code below will cause Luv to free the handle during GC and then Libuv will try to access it (because of UV_HANDLE_ENDGAME_QUEUED), causing an assert/crash/undefined behaviour (tested on Windows, different platforms have different closing procedures, so not sure if it happens everywhere):
Note that adding a
uv.run()
at the end of the script fixes this specific case.I'm not quite sure how to fix either of these. I'll need to do more research and maybe check into how Node handles this sort of thing if possible (Node might be different though since Luv gives direct access to uv_run and I don't think Node does?).
The text was updated successfully, but these errors were encountered: