kern/92243: sendfile(2) returns early on files > 4GB

Yar Tikhiy yar at comp.chem.msu.su
Mon Jan 30 05:20:06 PST 2006


The following reply was made to PR kern/92243; it has been noted by GNATS.

From: Yar Tikhiy <yar at comp.chem.msu.su>
To: bug-followup at FreeBSD.org, dkelly at hiwaay.net,
        "David G. Lawrence" <dg at dglawrence.com>
Cc:  
Subject: Re: kern/92243: sendfile(2) returns early on files > 4GB
Date: Mon, 30 Jan 2006 16:12:45 +0300

 > From: "David G. Lawrence" <dg at dglawrence.com>
 > To: David Kelly <dkelly at hiwaay.net>
 > Cc: freebsd-gnats-submit at FreeBSD.org
 > Subject: Re: kern/92243: sendfile(2) returns early on files > 4GB
 > Date: Mon, 23 Jan 2006 23:09:08 -0800
 > 
 >  > >How-To-Repeat:
 >  > Get a file which is larger than 4G via ftpd, apache, or anything else which uses sendfile(2).
 >  
 >     Do you know if sendfile(2) is returning an error in the failure case?
 
 It was me who added the code about "premature end of file" to ftpd(8).
 The code is to be hit only when sendfile(2) reports a EOF condition
 when not all file has been sent according to the byte count.
 That is, the bug should manifest itself in sendfile(2) storing 0 to
 *sbytes and returning 0 when ($filesize - 2^32) bytes have been sent.
 No errno involved.
 
 Yar


More information about the freebsd-bugs mailing list