From kmail-devel Wed Mar 21 18:45:40 2001 From: Mathias Waack Date: Wed, 21 Mar 2001 18:45:40 +0000 To: kmail-devel Subject: Re: Bug#22749: SEGV in imap kioslave on Solaris X-MARC-Message: https://marc.info/?l=kmail-devel&m=98520046031932 On Wednesday 21 March 2001 19:21, Jan de Visser wrote: > Did some poking around, and figured out that the problem is that > basically the following happends: > > QString foo; > ... > qDebug( "foo: %s", foo.latin1() ); > > When you delve into the qt code, instantiating a QString like this > gives you a string object with a NULL character buffer. latin1() > then returns NULL as well, and Solaris barfs on that. > > So the question is: > 1. Is that the wanted behaviour? I would think that 'QString foo' > gives me an empty string ("") not a NULL string. > 2. Why does it work on Linux? Is Linus more forgiving here?? I don't know much about the Qt internal, but think that the qDebug finishes in calling somethin like printf? The printf implementations in the gnu libc and the native Solaris libc seems to be different. From the Gnu libs info pages: If you accidentally pass a null pointer as the argument for a `%s' conversion, the GNU library prints it as `(null)'. We think this is more useful than crashing. But it's not good practice to pass a null argument intentionally. And the Solaris printf(3C) man page: An argument with a null value will yield undefined results. Maybe this helps you a little bit? Mathias _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail