Bugzilla from [email protected] wrote:
> 
> On Thu, Jan 15, 2009 at 9:09 AM, galapogos <[email protected]> wrote:
>>
>> Thanks kcc. I've compiled it dynamically now for debugging, but I'm still
>> getting many errors, particularly of these type
>>
>> Syscall param <function(params)> points to uninitialised byte(s) and/or
>> Conditional jump or move depends on uninitialised value(s)
>>
>> This doesn't make sense to me since the values are in fact initialized,
>> or
>> if they're not, it doesn't matter because the function will write to the
>> variable, hence initializing it. I'm getting these errors on simple
>> ioctl()
>> calls, and even malloc()/strcpy()/etc.
> 
> What compiler options did you use?
> Also, could you please provide more info (compiler version, valgrind
> version, linux version, maybe some exemplary output).
> 
Sure.

I'm using gcc with -Wall -g -O0 options.
I'm building in Mandriva Linux 2008.1 using gcc 4.2.3, and using
valgrind-3.3.0-3mdv2008.1.i586.rpm
Here are the 1st few output:

==30486== Syscall param ioctl(SG_GET_VERSION_NUM) points to uninitialised
byte(s)
==30486==    at 0x4100299: ioctl (in /lib/i686/libc-2.7.so)
==30486==    by 0x80498A5: main (a_scsi.c:1139)
==30486==  Address 0xbe8f4f20 is on thread 1's stack
==30486== 
==30486== Conditional jump or move depends on uninitialised value(s)
==30486==    at 0x804883F: a_identify_device (a_scsi.c:135)
==30486==    by 0x80498A5: main (a_scsi.c:1139)
==30486== 
==30486== Conditional jump or move depends on uninitialised value(s)
==30486==    at 0x402398B: strncpy (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==30486==    by 0x804898A: a_identify_device (a_scsi.c:203)
==30486==    by 0x80498A5: main (a_scsi.c:1139)
==30486== 
==30486== Conditional jump or move depends on uninitialised value(s)
==30486==    at 0x4023997: strncpy (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==30486==    by 0x804898A: a_identify_device (a_scsi.c:203)
==30486==    by 0x80498A5: main (a_scsi.c:1139)
==30486== 
==30486== Conditional jump or move depends on uninitialised value(s)
==30486==    at 0x402274B: strlen (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==30486==    by 0x408FF94: puts (in /lib/i686/libc-2.7.so)
==30486==    by 0x80498C5: main (a_scsi.c:1142)

Basically my main calls a_identify_device() in a_scsi.c, which does an if
(ioctl()) call, and apparently valgrind is complaining that
SG_GET_VERSION_NUM, which is one of its parameters, is uninitialized. This
doesn't make sense to me since SG_GET_VERSION_NUM is a constant integer?

The other string functions that are reported are also used in if statements,
however all data have been previously initialized.

Let me know if you need more information. Thanks again!
-- 
View this message in context: 
http://www.nabble.com/Suppressing-messages-from-libraries-tp21471039p21472673.html
Sent from the Valgrind - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to