On Tue, 2014-07-29 at 08:15 +0200, Matthias Apitz wrote:
> El día Monday, July 28, 2014 a las 07:11:02AM -0700, John Reiser escribió:
> 
> > > ==17454== Conditional jump or move depends on uninitialised value(s)
> > > ==17454==    at 0x5921F10: strchrnul (in /lib/libc-2.11.3.so)
> > > ==17454==    by 0x58E55D6: vfprintf (in /lib/libc-2.11.3.so)
...
> All was fine. Why is valgrind complaining?

Here is an hypothesis:

Looking at (in the SVN version) shared/vg_replace_strmem.c
strchrnul should have been replaced by the implementation
in vg_replace_strmem.c.

>From the stacktrace above, it looks like strchrnul was not replaced.

Often, the glibc implementations of the str* functions
are highly optimised, and causes false positive
(e.g. by assuming they can read a few more bytes than
the end of the string).

That might be the case for you.

What you could do is to redo your GDB session, but using
the valgrind gdbserver monitor command to check the definedness
of the printf args at various momenets and
just before the print call.

Note that using --track-origins=yes should indicate where
this unitialised byte is coming from.

Would be nice to understand why strchrnul was not replaced
(using e.g. -v -v -v --trace-redir=yes).

Philippe



------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to