|
From: Philippe W. <phi...@sk...> - 2014-07-28 21:03:44
|
On Mon, 2014-07-28 at 07:11 -0700, John Reiser wrote: > > ==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) > > > the involved fuctions are shown below; the statement in question (see below) > > is > > > > sprintf (select_anw, sel_anw, name, name); <********* sisisinst.c:1397 > > > > I have checked carefully the code and the 4 args to sprintf() are > > all correct defined on the stack; when I change the code to: > > > > > > select_anw[0] = '\0'; > > sprintf (select_anw, sel_anw, name, name); > > > > then is valgrind happy, i.e, does not raise the messages any more; > > You say that all 4 args are on the stack. What are their actual addresses? > Run with --db-attach=yes, say 'y' when asked, and use gdb to look around. --db-attach=yes should be considered as (is?) obsolete. You could instead use --vgdb-error=1 (to just attach when the error is reported) or better use --vgdb-error=0, put breakpoints and verify the (un-)definedness of the relevant variables at various points between their declaration and their usage. Philippe |