DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51HA39mc2872473 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 51HA39mc2872473 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=SAI/kyJC X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59F853858D21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1739786588; bh=jdXffqa9QVxund+wK57UHWAXtajHyTeKcESqF5UZ6s4=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SAI/kyJC1XWIWCi7t6ayQRzxScjf8TDefnLTfJrTA//R0zXjxa4m5iCunK2QfMUlq 6/0mRzFOOJkdZTl4sNzsINAA+Wy8FJ3DgLMp58kOUz0c3Yb1Bj+iYKK5SuwqkHhCM+ Q8X3VuCGU6UuZ4POZFc/67hpsgFodfmUio8jukrc= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 656BC3858D39 Date: Mon, 17 Feb 2025 11:00:48 +0100 To: cygwin AT cygwin DOT com Subject: Re: SEEK_DATA should fail at EOF (was: coreutils-9.6-1 (TEST): cp: infinite SEEK_SET/DATA/HOLE loop if file is compressed) Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <614771e9-592c-6154-d56d-13842b6fc6ac AT t-online DOT de> <5ccdf4be-4e4b-1846-9fd6-cba29c9dbb11 AT t-online DOT de> <19041f0a-80e5-fcf7-f98e-dd3893e31549 AT t-online DOT de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <19041f0a-80e5-fcf7-f98e-dd3893e31549@t-online.de> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Feb 15 12:18, Christian Franke via Cygwin wrote: > Corinna Vinschen via Cygwin wrote: > > On Feb 14 14:14, Corinna Vinschen via Cygwin wrote: > > > On Feb 14 13:49, Corinna Vinschen via Cygwin wrote: > > > > On Feb 14 12:24, Christian Franke via Cygwin wrote: > > > > > Hmm... does "beyond" mean '>=' or '>' ? > > > > ...do you think this fixes it? > > > > > > > > diff --git a/winsup/cygwin/fhandler/base.cc b/winsup/cygwin/fhandler/base.cc > > > > index 8f3dbd4ed51a..79dfaaa5987a 100644 > > > > --- a/winsup/cygwin/fhandler/base.cc > > > > +++ b/winsup/cygwin/fhandler/base.cc > > > > @@ -1144,7 +1144,7 @@ fhandler_base::lseek (off_t offset, int whence) > > > > return -1; > > > > } > > > > /* Per Linux man page, ENXIO if offset is beyond EOF */ > > > > - if (offset > fsi.EndOfFile.QuadPart) > > > > + if (offset >= fsi.EndOfFile.QuadPart) > > > > { > > > > set_errno (ENXIO); > > > > return -1; > > > Yeah, it does. I'll push the patch. > > Patch is in the latest cygwin-3.6.0-0.373.gfac7441835b0 > > test release. > > > > We're probably releasing 3.6 in the next few weeks. > > > > Problem does not longer occur with 3.6.0-0.374.g4dd859d01c22.x86_64 and cp > from coreutils-9.6-1. Great, thanks for checking! Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple