|
From: Cerion Armour-B. <ce...@va...> - 2007-06-13 19:11:14
|
On Wednesday 13 June 2007 19:40, Paul Floyd wrote:
> Quoting Nicholas Nethercote <nj...@cs...>:
> > On Wed, 13 Jun 2007, Paul Floyd wrote:
> > > When I added
> > >
> > > VALGRIND_PRINTF("min %p %g %g", &min, min, _UNDEF);
> > >
> > > just before the supposed error site,
> > >
> > > a) the error went away
> > > b) I didn't get any "%g" output (perhaps this is normal?)
> >
> > I don't know what the %g is supposed to do, but Valgrind's internal
> > printf doesn't handle floats or doubles, and VALGRIND_PRINTF will also
> > not handle arguments larger than word-size.
> >
> > What is _UNDEF? Could it be undefined?
>
> Hi
>
> I looked at the source a bit, and I saw that vprintf was being called, so I
> assumed that it was using the C std lib version. %g should be for
> floats/doubles, using an exponent for large/small values.
>
Valgrind has it's own internal printf implementation.
But the docs do seem to be lacking details of the supported formatting...
If you take a look at VG_(debugLog_vprintf), in m_debuglog.c, you'll see that
the following formatting flags are supported (a-la printf)
d,u,p,x,c,s
i.e. indeed, no floats/doubles supported.
> _UNDEF is defined, and is used as a 'magic number' to indicate an undefined
> state.
>
> Still, this looks like a false positive.
>
> A+
> Paul
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
|