Re: dd -- bs>=2G, error writing to /dev/null - possible bug? (win7; coreutils 8.26)
- Date: Sun, 12 Mar 2017 15:49:47 +0100
- From: Marco Atzeri <marco.atzeri@xxxxxxxxx>
- Subject: Re: dd -- bs>=2G, error writing to /dev/null - possible bug? (win7; coreutils 8.26)
On 12/03/2017 12:39, Corinna Vinschen wrote:
On Mar 12 00:33, Josef Frank wrote:
dd utility has problems to write to /dev/null with bs>=2^31,
while bs<2^31 is ok.
Increasing bs further to 2^33 leads to extended error message
For description see below
Thanks for the testcase. It's a combination of two bugs:
- At a crucial point in write(2), Cygwin used an int variable where
it should have used a ssize_t variable. This fouled up the return
value for lengths >= 2^31.
- When writing to the Windows NUL device, NtWriteFile only returns the
lower 32 bits od the number of bytes written. This fouls up the
return value of write(2) for lengths >= 2^32.
I fixed the first problem and created a workaround for the second.
I uploaded new developer snapshots to https://cygwin.de/snapshots/
Please give 'em a try.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple