delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/03/12/07:39:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=txVTtNu40mw9NUOZnYzbQ/QjfmBog3fOFoUXXWlYmiFam6HTjzDBt
Lrx2AGJLQSWo7gl4zs8VaPVxIk3amspxooQ4AjaTqOI/dYzOAZ0//xpPj10N83Z0
ONp17AV40q6Vf4reb7Q+fTewKD3Dh9dsIhejYf922RES2TCyJNGGC8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=Kmc2CstFkkChBJuiehYy2Cn91g8=; b=FIWdUtQLwEscZNEuhf3jMCuHrIYB
WLUtSj4bCKactZ7MWAMRdAy6kG70t+z4w7zOgvjiQcXaMZjqQgUf6H1cZUoqTOF0
Y90hIM49zzA6EgAwcZBBGQEiEfVEVWpGVJaM84cqMV8YmKUXH9gAfjryOjPXjJs7
YsSXiq5HmvUeiJw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-99.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=8.26, coreutils, Josef, josef
X-HELO: drew.franken.de
Date: Sun, 12 Mar 2017 12:39:12 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: dd -- bs>=2G, error writing to /dev/null - possible bug? (win7; coreutils 8.26)
Message-ID: <20170312113912.GE3340@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <aa90da78-60b7-489a-e953-0a48639785cf AT gmx DOT ch>
MIME-Version: 1.0
In-Reply-To: <aa90da78-60b7-489a-e953-0a48639785cf@gmx.ch>
User-Agent: Mutt/1.7.1 (2016-10-04)

--eAbsdosE1cNLO4uF
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 12 00:33, Josef Frank wrote:
>=20
> Dear all,
>=20
>=20
> dd utility has problems to write to /dev/null with bs>=3D2^31,
> while bs<2^31 is ok.
>=20
> Increasing bs further to 2^33 leads to extended error message
>=20
> 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 >=3D 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 >=3D 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.


Thanks,
Corinna

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

--eAbsdosE1cNLO4uF
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYxTNgAAoJEPU2Bp2uRE+gMrkP/1GfTvX2VnNn8hYZJ1VSHZDg
2/JQ2OMqTg97COBXEYhcWqaTFR3DZkh/nY2lcCBBGPZvT4VMfWp6WlGB9Lwx0OUq
3gMPJj5Jrc8jEUB7QSerJH2nDu1GZ0/PwCBm1F3mbp4VSuKu8Dz15XdSO3+h7qZR
GEKkzbEtYQTxb7oI4Bkh+XjzByHtNvVQRgx+AtItRw8nRWMKf+XFglh8H9KUuK5r
IdLFIPv5jX3ryPaM0R+lmQ7CdOCPvamB2LepLL4mtsTS4/dMOfvdj4qiCI1IZIpt
jGCJO1dzuRrnchqx4ktayi2lgQHeOzBGJ7FkRr6vf6y5kTSNyHsFPzDWot+A4pJL
ne8jQQd5DtHU68QcZbGgupmjUVAbo9StDI3FZhfWf+ZTsFi7Of8RobKd1f/26DKF
rvcCwA7OevN7tKBNo0LvnDPtvssCqqPDa8WoApUTJD9uY9mpAyDIo0h3E696sidx
ivqEftegEKAmRcwz+nvivX/aCA8DsNDhQA+R7KtzHuf3Fsb8lvrt/sOyTnc8yGKu
u85xIEjlplfhciwGdDI0XrYbmUFcIUT5X7IHGmWsLi1E+E29yN8kpyEAcrwiS0xV
+YK5kkRsSZyv9NxYBhbupUboU6whRnuX6cgyrRN1FaKG2qp/KZ2MqUvFw+dTagKl
+fxhzSAT1jmTXbra2L39
=nMw8
-----END PGP SIGNATURE-----

--eAbsdosE1cNLO4uF--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019