This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc segfault on "special" long double values is _ok_!?
- From: Bruno Haible <bruno at clisp dot org>
- To: Andreas Schwab <schwab at suse dot de>, Jim Meyering <jim at meyering dot net>
- Cc: libc-alpha at sourceware dot org, bug-gnulib at gnu dot org, Ulrich Drepper <drepper at redhat dot com>
- Date: Thu, 7 Jun 2007 03:46:06 +0200
- Subject: Re: glibc segfault on "special" long double values is _ok_!?
- References: <87y7ixb6wb.fsf@rho.meyering.net> <87odjtb3wq.fsf@rho.meyering.net> <jewsyhkxpx.fsf@sykes.suse.de>
Andreas Schwab asked:
> In which way is this different from printf("%s", (char*)1)?
The elementary operations on strings (strlen etc.) crash on (char*)1 too,
therefore one cannot blame 'printf' in particular in the string case.
The elementary operations on long doubles (==, +, isnanl, etc.) produce
no SIGSEGV; in the default settings they do not even produce a SIGFPE.
But 'printf' gives a SIGSEGV.
Bruno