[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#585809: valgrind: stripped ld.so causes tons of false positives



reassign 585809 valgrind
thanks

On Mon, Jun 14, 2010 at 11:31:19AM +0200, Aurelien Jarno wrote:
> On Sun, Jun 13, 2010 at 04:48:09PM -0700, Nick Lewycky wrote:
> > Package: valgrind
> > Version: 1:3.5.0-3
> > Severity: important
> > 
> > A change in /lib/ld-linux.so.2 has made valgrind report an excess number of
> > errors:
> > 
> > $ valgrind /bin/true
> > ==6032== Memcheck, a memory error detector
> > ==6032== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> > ==6032== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
> > ==6032== Command: /bin/true
> > ==6032== 
> > ==6032== Conditional jump or move depends on uninitialised value(s)
> > ==6032==    at 0x4416471: strlen (strlen.S:110)
> > ==6032==    by 0x4407C04: _dl_init_paths (dl-load.c:776)
> > ==6032==    by 0x4402A2C: dl_main (rtld.c:1393)
> > ==6032==    by 0x44141D6: _dl_sysdep_start (dl-sysdep.c:243)
> > ==6032==    by 0x4400C6C: _dl_start (rtld.c:338)
> > ==6032==    by 0x4400856: ??? (in /lib/ld-2.11.1.so)

The problem is that strlen() process data 4 bytes by 4 bytes, so it can 
read up to 3 bytes more if the first byte is 0. That's why valgrind
triggers here.

However this is a valid optimisation as long as you don't cross a page,
so valgrind should be taught about that in its suppress files.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Reply to: