This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dd -- bs>=2G, error writing to /dev/null - possible bug? (win7; coreutils 8.26)

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
Please give 'em a try.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]