Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 16 Jun 2013 10:36:17 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: valgrind problems

On Sun, Jun 16, 2013 at 04:16:43PM +0200, Jens Gustedt wrote:
> Am Sonntag, den 16.06.2013, 13:39 +0200 schrieb Szabolcs Nagy:
> > note that valgrind cannot emulate 80bit long double arithmetics
> > (uses 64bit arithmetics instead) which breaks floating-point
> > printf and strtod functions in musl (and most math code on x86
> > take slightly different code paths, some break badly)
> > 
> > so valgrind has issues with floating-point code and there were
> > limitations with threading as well
> 
> Hm, valgrind seems to be *the* tool that is used everywhere. And on
> glibc platforms it gives valuable insight and finds a lot of bugs. As
> a naïve user of musl I would just expect it to work.

I agree with you Jens -- user expectation is that valgrind should
work (reasonable) and that valgrind is the best available tool for the
job (which I believe is still true).

However the floating point issue is real; valgrind will badly
mis-execute code calling strtod or any of the scanf family of
functions for floating point parsing, and will give subtly different
results for a large portion of the math library.

If anyone has a good working relationship with the valgrind team, I
think we should raise this issue politely and aim to get correct
floating point emulation added to valgrind. Obviously it may have to
be done in software rather than using the host's floating point, but
there's already a good, presumably bit-exact, GPLv2 implementation of
i387 floating point emulation in the kernel if nobody wants to write a
new one.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.