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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=NeBetO3D+CgUVjKb d+aaDjZ8y+HKKOm0jKX4PLDpjRbcd+QulvCd2TqQMQAthhjxkhiC/tawgu++I80i z6+hf98D8cld2a6g2bYdvDzIkkrsKKSJtsw7Vl4mUR8j4CAIaV8KUh9bdwEvMaQf jSHLapZfs28QMdJhlqEy0uyo4Iw= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=xNt9foObYOk8hTmEqf1vYb SPaLc=; b=TtYKBb3oT5bUpyO/JRrNsGtFBpp9cuIRubGsJF7Ye2m/XGmrCi2yFi eCvPz+GHc2/jstNr7GlopgcfJc+RrsBlgThnDELwOS3tfiNGPNQ5ce6JiwPqNXMu KnDAkkcDo66ad8I01k1kAV2XVwPT5KOHRjUMhmqVxInZ/V4SHTZnU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=dear, Dear X-HELO: mail-wm0-f50.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=85nRC3ox60MJTluM56kTtdZGcgFCC4OCAflHXvSyzN4=; b=IxwRiZK/coGb/mX9xxjiYdlQPd2i5apmBgl1b+Tb67ll1llgUwdscxMjVLcdFYCbmG X6tfwoCGW4GVjb/GoJPbR+axmrTTkTQnFi1tXuKccKqEoTF5haA1yIjR/08yD7qNSsG6 qfgZT86h3cqprk0kU2CVzTto10lgU1GpCX292oLuiQRSsyPh1e90XNKNBt5nVZG8WxNC 8ETOnraFoUUgmuKxODKmjYnDzmlhlkV+Qji0PaI/3oSNWp3Nikv/lMASlgJwd4MBaEwD TbYZL4tOTIUhN+bSWC5FEtt9mAIi3Vc6EdwPZtEph0pyntnvAIEyCnZIvgnCFwdk4D+z rWXg== X-Gm-Message-State: AFeK/H17+BIibrtn+Em/UPSv3ekNrQGbcv7LlTjJaCTYI2kJL3PDR8q7tc2CwEFYsZ9A0g== X-Received: by 10.28.105.92 with SMTP id e89mr5986229wmc.93.1489330193743; Sun, 12 Mar 2017 07:49:53 -0700 (PDT) Subject: Re: dd -- bs>=2G, error writing to /dev/null - possible bug? (win7; coreutils 8.26) To: cygwin AT cygwin DOT com References: <20170312113912 DOT GE3340 AT calimero DOT vinschen DOT de> From: Marco Atzeri Message-ID: <11cc4359-a1f0-de30-24b5-6803fca100a9@gmail.com> Date: Sun, 12 Mar 2017 15:49:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170312113912.GE3340@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 https://cygwin.com/snapshots/ > > > Thanks, > Corinna Cheers Marco -- 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