[9516] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: gtk_init wierdness

daemon@ATHENA.MIT.EDU (Jason A. Pfeil)
Thu Oct 22 13:34:36 1998

Date: Thu, 22 Oct 1998 13:19:41 -0400 (EDT)
From: "Jason A. Pfeil" <pfeil@nu.cs.fsu.edu>
To: gtk-list@redhat.com
In-Reply-To: <199810221600.MAA05853@mousetrap.ml.org>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

If I remember right, you said that it crashed without the #ifdef in place
and didn't crash with the #ifdef in place...  Well, the #ifdef jumps over
the fclose() call, but without the #ifdef, it will execute the fclose()
call.

--Jason

On Thu, 22 Oct 1998, katre wrote:

> > 
> > On Thu, 22 Oct 1998, Jason A. Pfeil wrote:
> > 
> > > What is the value of story_file_p?  Trying to close a file pointer that
> > > points to null is also suicidal for a program.
> > 
> > I've noticed that closing a null pointer IS ok if you're using libc5, but
> > glibc does produce the segv, as it should.  Note, some older apps that
> > were designed with libc5 think that it's perfectly okay to close null
> > pointers, and don't check for it... it's scary :)
> > 
> 
> Would it still cause a crash if it's not being executed.  Seriously, the only
> code being executed here is the printf(), gtk_init(), and the last printf().
> Why should it matter if a function that is not called tries to close a NULL
> pointer?
> 
> katre
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student      101 Carothers Hall
http://www.cs.fsu.edu/~pfeil			       C3527 University Center
pfeil@cs.fsu.edu				       (850)644-8014

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post