- Version: 1.42.0
- Platform: Linux/Unix (generic)
uv_fs_write returns an int, but the underlying Linux syscalls return a ssize_t. That conversion is problematic for large writes and has caused a few bugs in Node.js, including:
There are a handful of issues about related compiler warnings (#708, #2714), but I don't see an issue for the actual bug.
I think the only way to fix this without a breaking change is to add ssize_t uv_fs_write64 or ssize_t uv_fs_write2 or something. uv_fs_s's result property is already a ssize_t, so only the return type needs changing.
uv_fs_writereturns an int, but the underlying Linux syscalls return a ssize_t. That conversion is problematic for large writes and has caused a few bugs in Node.js, including:There are a handful of issues about related compiler warnings (#708, #2714), but I don't see an issue for the actual bug.
I think the only way to fix this without a breaking change is to add
ssize_t uv_fs_write64orssize_t uv_fs_write2or something.uv_fs_s's result property is already assize_t, so only the return type needs changing.