Re: [bug-gnulib] Handling null pointers to printf

2006-05-30 Thread Bruno Haible
Bruce Korb wrote: > sometimes, I do want the seg fault. So, how about selectable behavior? If you want to always get a SEGV when the user passes a NULL argument, you will have to arrange that through your code. POSIX doesn't guarantee you a SEGV here. 90% of your users, at least, will be on glib

Re: [bug-gnulib] Handling null pointers to printf

2006-05-26 Thread Bruce Korb
Aaron Stone wrote: Crashing on null %s args puts gnulib at odds with all other open source lib's -- glibc, *BSD libc's, so on. People use gnulib to get the gnuish behavior on other platforms. Being safe about nulls is a gnuish behavior that many people appreciate. Indeed. Then, sometimes, I do

Re: [bug-gnulib] Handling null pointers to printf

2006-05-26 Thread Aaron Stone
On Fri, 2006-05-26 at 10:55 +0100, James Youngman wrote: > On 5/24/06, Bruno Haible <[EMAIL PROTECTED]> wrote: > > > Then the argument about the glibc behaviour and the *BSD libc behaviour is > > moot: if there's a single platform where it crashes, and if the standard > > says > > that NULL are i

Re: [bug-gnulib] Handling null pointers to printf

2006-05-26 Thread James Youngman
On 5/24/06, Bruno Haible <[EMAIL PROTECTED]> wrote: Then the argument about the glibc behaviour and the *BSD libc behaviour is moot: if there's a single platform where it crashes, and if the standard says that NULL are invalid arguments, gnulib's implementation can crash as well. I would go fu

Re: [bug-gnulib] Handling null pointers to printf

2006-05-24 Thread Bruno Haible
Hi, Aaron Stone wrote: > When glibc gets a null pointer in one of the printf-family of functions > for a %s argument, it prints "(null)" and doesn't crash. All of the > *BSD's libc's also print "(null)". > > Gnulib, when using its own vasnprintf implementation, does crash. The > principal offender

Handling null pointers to printf

2006-05-24 Thread Aaron Stone
Hi, When glibc gets a null pointer in one of the printf-family of functions for a %s argument, it prints "(null)" and doesn't crash. All of the *BSD's libc's also print "(null)". Gnulib, when using its own vasnprintf implementation, does crash. The principal offender is Solaris, for which a) thi