Re: Is this a bug in libc6?
On 10-Apr-98, 18:00 (CDT), Manoj Srivastava <email@example.com> wrote:
> I have looked at the standards to shed some liight on this
> subject, and I failt to see any statements that a second flose is
> cause for undefined behaviour, asuming you meant the technical term
> ``undefined'' when you say "not defined".
My copy of the standard is at work, but I think there's a statement near
the beginning of the <stdio.h> section that says calling any of the
I/O functions with an invalid FILE * is causes undefined behaviour. If
anybody really cares, I'll look Monday.
> >> A double fclose is just as bad as a double free() and is not a
> >> library error should it fault or corrupt memory.
> Hola! Corupting memory is not acceptable behaviour! (Unless
> you document this)
Sure it is. Go read the definition of "undefined behaviour" again --
"this standard imposes no requirment". It can corrupt memory, re-format
your hard disk, or make monkeys fly out of your nose; all of these
are ISO C compliant.
Hmmm, I suppose anything further should go to comp.std.c.
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com