From owner-freebsd-bugs@FreeBSD.ORG Mon May 31 23:10:03 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9DE2106566C for ; Mon, 31 May 2010 23:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D9A558FC18 for ; Mon, 31 May 2010 23:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4VNA3Ox070154 for ; Mon, 31 May 2010 23:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4VNA3ss070152; Mon, 31 May 2010 23:10:03 GMT (envelope-from gnats) Date: Mon, 31 May 2010 23:10:03 GMT Message-Id: <201005312310.o4VNA3ss070152@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: kern/147226: read(fd, buffer, len) returns -1 immediately, if len >=2147483648 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 23:10:04 -0000 The following reply was made to PR kern/147226; it has been noted by GNATS. From: Garrett Cooper To: Bruce Cran Cc: bug-followup@freebsd.org Subject: Re: kern/147226: read(fd, buffer, len) returns -1 immediately, if len >=2147483648 Date: Mon, 31 May 2010 16:06:38 -0700 On Mon, May 31, 2010 at 8:30 AM, Bruce Cran wrote: > The following reply was made to PR kern/147226; it has been noted by GNAT= S. > > From: Bruce Cran > To: bug-followup@FreeBSD.org, eugene.kharitonov@gmail.com > Cc: > Subject: Re: kern/147226: read(fd, buffer, len) returns -1 immediately, = =A0if > =A0len >=3D2147483648 > Date: Mon, 31 May 2010 16:21:05 +0100 > > =A0This actually looks like a 64-bit bug. > =A0http://opengroup.org/onlinepubs/007908775/xsh/read.html says that up t= o > =A0SSIZE_MAX bytes must be accepted, whereas FreeBSD only accepts up to > =A0INT_MAX bytes. The point being that SSIZE_MAX is INT_MAX on 32-bit archs and LONG_MAX on 64-bit archs. Cheers, -Garrett