Re: Is this a bug in libc6?
On 11-Apr-98, 00:12 (CDT), Manoj Srivastava <srivasta@datasync.com> wrote:
> Hi,
> >>"Gregory" == Gregory S Stark <gsstark@mit.edu> writes:
>
> Gregory> Manoj Srivastava <srivasta@datasync.com> writes:
> >> ----------------------------------------------------------------------
> >> Definitions of terms
> >>
> >> ... Permissible undefined behaviour ranges from ignoring the
> >> situation completely with unpredictable results, to
> [snip by sg]
>
> Firstly, read the whole sentence.
> Permissible undefined behaviour ranges from ignoring the situation
> completely with unpredictable results
>
> ignoring the situation completely with unpredictable results
>
> ignoring the situation completely
>
> ignoring the situation ...
>
> get it? If ignoring a second fclose makes monkeys fly out of
> your nose, then fine. You have a strange nose.
I think you've misread that sentence. The situation it is permissible
to ignore is the fact that a construct invoking undefined behaviour
has occurred (e.g. a second call to fclose() with the same FILE *).
The library is free to attempt to try to "close" whatever the garbage
is pointed to...which may lead to a hard disk re-format, or on certain
embedded implementations, monkeys issuing from the nose. I don't *think*
the implementation is required to catch the fact that it's an invalid
FILE *, and then ignore the attempt to fclose().
This actually *is* almost worth asking on comp.std.c; I've never
interpeted that sentence the way you're interpeting it, but I can
see your point of view.
steve
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: