Closed talex5 closed 1 year ago
https://github.com/aantron/luv/blob/0ed668e87ca55d65f4f84422b0dd3381701c71b0/src/c/luv_c_type_descriptions.ml#L147
But it should be size_t: http://docs.libuv.org/en/v1.x/misc.html#c.uv_buf_t
size_t
Test-case:
let () = let bufs = [Bigarray.Array1.of_array Bigarray.Char Bigarray.c_layout [|'H'; 'i'|]] in Luv.File.write Luv.File.stdout bufs (fun _err -> assert false)
strace on this shows:
strace
[pid 17512] write(1, "Hi\3\377\204\251\356\0\0\0\3\377\204\251\356\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!"..., 8589934592) = 2147479552
This was fixed in #133 by @haesbaert and the follow-on 76c713f952f70b947b7f8da8628f0d39511ec052, which has Luv interpret the field as a size_t, and will be released in 0.5.12. cc @raphael-proust.
https://github.com/aantron/luv/blob/0ed668e87ca55d65f4f84422b0dd3381701c71b0/src/c/luv_c_type_descriptions.ml#L147
But it should be
size_t
: http://docs.libuv.org/en/v1.x/misc.html#c.uv_buf_tTest-case:
strace
on this shows: