panel crashed, segmentation fault

Olivier FOURDAN FOURDAN.Olivier at wanadoo.fr
Thu Mar 13 14:16:08 CET 2003


Hi Benny,

Okay, great, so now, I ask you to remove the replacement of the static buffer and put back the g_strdup_printf() for the following reasons :

1) snprintf is not available on all platforms (e.g. some older versions of Solaris don't have snprintf, while g_snprintf equivalent is provided by glib)
2) I'm against static buffers and try as much as possible to avoid their use, because, most of the time, you just cannot guarantee that the default size you put for the buffer will fit for in all cases.
3) I think the the speed improvements that result from the use of static buffer are nothing compared to the drawbaks of having fixed buffer size.
4) I don't care about memory fragmentation. That's the job of the underlying system after all...

Cheers,
Olivier.




>Messsage du 13/03/2003 14:02
>De :  <xfce4-dev at xfce.org>
>A :  <xfce4-dev at xfce.org>
>Copie à : 
>Objet : Re: Re: panel crashed, segmentation fault  
>
> On Thu, 13, Mar 2003, Olivier FOURDAN wrote:
> 
> > Benny,
> 
> Hello Olivier,
> 
> > I noticed you removed most of the "g_return_if_fail()" statements, putting them under an #ifdef DEBUG/endif
> 
> This was only done for static functions, whose arguments are garantied to
> be != NULL.
> 
> > This is _a_very_bad_idea_! Those tests are there on purpose. If you want to remove them at compile time, there is a glib option that ignores all those statements, but still, this is a bad idea to remove them all together.
> 
> Ok, I'll revert the change.
> 
> > Cheers,
> > Olivier.
> 
> regards,
> Benedikt
> 
> -- 
> Those who do not understand Unix are condemned to reinvent it, poorly.
>     -- Henry Spencer
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://moongroup.com/mailman/listinfo/xfce4-dev
> 




More information about the Xfce4-dev mailing list