Ian Collins <[EMAIL PROTECTED]> wrote:
> >Solaris libc, unfortunately, also allows free(foo); free(foo);
> >
> >
> >
> Legal undefined behaviour :)
Calling free(foo); free(foo); is not legal and may result in anything, including
pink smoke on top of your screen.
free(foo); free(foo); however is no problem as you may catch it vua libumem.
A real problem is fclose(fp); fclose(fp);
It does not harm on Solaris but it results in a free(foo); free(foo); call
on Linux although Linux did mark *fp to be closed already. This is something
that happened in SCCS before I fixed it and there is no way to detect it
on Solaris.
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]