Date: Tue, 7 Sep 1999 10:01:29 -0700 (PDT) From: bde@FreeBSD.ORG (Bruce Evans) To: freebsd-bugs@FreeBSD.ORG, jkoshy@FreeBSD.ORG Subject: Re: kern/6184: No error if resulting file pos in lseek is negative Message-ID: <19990907170129.D163214C29@hub.freebsd.org> In-Reply-To: <199909070840.BAA89146@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Any reason why this shouldn't go into -current? If there aren't any Yes, it breaks seeking to half of the address space in /dev/mem and dev/kmem on 64-bit machines. The maximum value for an lseek() offset depends on the file. I think POSIX indirectly requires checking against the limit at lseek() time, at least for regular files, since there is no Standard way for read(2) to report failure due to an invalid offset (FreeBSD documents returning EINVAL, but ufs actually returns EFBIG). Applications still need to be careful about seeking to (off_t)-1 if they actually want to do this, since (off_t)-1 may be a valid seek offset. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990907170129.D163214C29>