Skip to content

Don't use stack allocated buffer for uv_write()

Ondřej Surý requested to merge 2332-disable-vectored-io-on-non-Linux into main

On FreeBSD, the stack is destroyed more aggressively than on Linux and that revealed a bug where we were allocating the 16-bit len for the TCPDNS message on the stack and the buffer got garbled before the uv_write() sendback was executed. Now, the len is part of the uvreq, so we can safely pass it to the uv_write() as the req gets destroyed after the sendcb is executed.

Closes #2332 (closed)

Merge request reports