Web lists-archives.com

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:

Dear all,

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.

May be



Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple