Closed
Description
#4374 introduces a bug: it makes socket.send()
accept an array but it's not resilient against that array getting modified afterwards:
$ node -e '
var a = ["boom!"], s = dgram.createSocket("udp4");
s.send(a, 1234);
a.splice(0);
'
node: ../deps/uv/src/unix/udp.c:390: uv__udp_send: Assertion `nbufs > 0' failed.
Aborted (core dumped)
A secondary issue with #4374 is that it penalizes the common case of passing in a buffer by always wrapping it in an array.