You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If utp_create_socket is called, and then utp_connect is not called, there's no way to reclaim the utp_socket memory. If the parent utp_context is destroyed, the memory for the unconnected utp_socket is not reclaimed, and it's no longer possible to call utp_connect.
sock = utp_create_socket(ctx)
utp_destroy(ctx)
# segfaults, no way to reclaim sock memory
utp_connect(sock)
I think utp_connect should not segfault if the parent utp_context is destroyed, and utp_close should probably delete the utp_socket if it's uninitialized.
The text was updated successfully, but these errors were encountered:
anacrolix
added a commit
to anacrolix/go-libutp
that referenced
this issue
Jun 13, 2018
If
utp_create_socket
is called, and thenutp_connect
is not called, there's no way to reclaim theutp_socket
memory. If the parentutp_context
is destroyed, the memory for the unconnectedutp_socket
is not reclaimed, and it's no longer possible to callutp_connect
.Here's another sequence:
I think
utp_connect
should not segfault if the parentutp_context
is destroyed, andutp_close
should probably delete theutp_socket
if it's uninitialized.The text was updated successfully, but these errors were encountered: