aboutsummaryrefslogtreecommitdiff
path: root/docs/code/tcp-echo-server/git@kaiwu.me:public/libuv
diff options
context:
space:
mode:
authorJameson Nash <vtjnash@gmail.com>2025-07-10 09:08:36 -0400
committerGitHub <noreply@github.com>2025-07-10 09:08:36 -0400
commit7026ae0fe26693ae825e7673a08a2831e59f363f (patch)
tree607585958b9ad4b8ef67002feb6a264348885be6 /docs/code/tcp-echo-server/git@kaiwu.me:public/libuv
parent454637403af8ce12949d6e6cc64ce6523433a8b9 (diff)
downloadlibuv-7026ae0fe26693ae825e7673a08a2831e59f363f.tar.gz
libuv-7026ae0fe26693ae825e7673a08a2831e59f363f.zip
win,pipe: minimal fix to uv_read_cb->uv_read_start recursion bug (#4784)
Starting a new read after uv_read_cb returns causes memory corruption on the OVERLAPPED read_req if uv_read_stop+uv_read_start was called during the callback after the latest refactoring. This apparently also forces the kernel to deadlock us, since it apparently cannot cancel the second read while the first one is pending (reads apparently are not permitted to finish out of order). Avoid that simply by not issuing another read (set more=0) if there is already a read pending (from uv_read_start). There are probably better things we could do here (such as bring back `uv_active_tcp_streams_threshold`), but the current `alloc_cb` design may not currently permit that without making breaking changes. We could also detect in `uv_read_start` that we are inside of of the `read_cb` for that stream, and defer the actual zero-read until the read_cb returns, but that would likely be a larger change. Fix #4738
Diffstat (limited to 'docs/code/tcp-echo-server/git@kaiwu.me:public/libuv')
0 files changed, 0 insertions, 0 deletions