This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc segfault on "special" long double values is _ok_!?


On 6/8/07, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
On Fri, 2007-06-08 11:54:17 +0100, James Youngman <jay@gnu.org> wrote:
> On 6/8/07, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> > hexdump (&my_long_double, sizeof my_long_double());
> > kill (getpid (), SIGABRT);
>
> or just call abort() which is designed for the purpose.
>
> > That way, you get a nice core dump and can call GDB with it. With
> > "clean" floats, just use GDB's "print" to print it (or even call
> > printf() with it.)
>
> If printf fails on the offending bit pattern, presumably that is not
> going to help.

It does!  You've got the core file, so you have a second (and
third...) try to examine the offending bit pattern with different
methods.

You're certainly right. The only problem is that this approach doesn't scale particularly well, because although it is still susceptible to automation, the automation itself is harder.

Even for those cases: a loud crash is something that can be easily
debugged.

My central point, which I'm sure you didn't miss, is that in some of these cases, the invalid data is not the result of an application bug.

James.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]