Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Chris Wedgwood <chris@cybernet.co.nz>
To: Quant-X Alpha Linux Support <support@quant-x.com>, axp-list@redhat.com
Cc: redhat-devel-list@redhat.com
Subject: Re: fclose() - still broken?
Date: Thu, 20 Aug 1998 12:12:06 +1200	[thread overview]
Message-ID: <19980820121206.A418@caffeine.ix.net.nz> (raw)
In-Reply-To: <199808190250.EAA04909@stefan.sime.com>; from Quant-X Alpha Linux Support on Wed, Aug 19, 1998 at 04:50:08AM +0200

On Wed, Aug 19, 1998 at 04:50:08AM +0200, Quant-X Alpha Linux Support wrote:

>   rc = read(0, NULL, 10);
> 
>   returns 6 here (Linux 2.1.113 i586) (no errno, no core) 
>   when entering "hello<CR>"
> 
> Is this valid, or not ? ;-0

If you have a writable page at 0x0, then yes.

A stickier question is what happens you you try to read a 10 byte
file using read(fd,&buffer,8192) when the buffer is only 4k is size.

2.0.x will return EFAULT because it knows the entire range is not
valid (the high 4k is bad), but 2.1.x will succeed because it can
read 10 bytes without failing.

Which is correct? (Btw, different OSs take one or other approach).




-cw


  parent reply	other threads:[~1998-08-20  0:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m0z8jmQ-000aNFC@the-village.bc.nu>
1998-08-18 10:48 ` fclose() - still broken? Uncle George
1998-08-19  2:00   ` Chris Wedgwood
1998-08-19  2:50     ` Quant-X Alpha Linux Support
1998-08-19 12:04       ` Uncle George
1998-08-19 12:00         ` David Alan Gilbert
1998-08-20  0:12       ` Chris Wedgwood [this message]
1998-08-20  7:33         ` Richard Henderson
1998-08-18 10:19 Uncle George
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox