Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95439 - sys-libs/glibc-2.3.5 +valgrind: jump or move depends on uninitialised value(s)
Summary: sys-libs/glibc-2.3.5 +valgrind: jump or move depends on uninitialised value(s)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Maurice van der Pot (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-08 04:55 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2005-08-03 12:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2005-06-08 04:55:29 UTC
dhp@mercure:/tmp$ cat main.c
int main()
{
        return(0);
}
dhp@mercure:/tmp$ gcc main.c -Wall
dhp@mercure:/tmp$ valgrind --tool=memcheck --db-attach=yes ./a.out
==21536== Memcheck, a memory error detector for x86-linux.
==21536== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==21536== Using valgrind-2.4.0, a program supervision framework for x86-linux.
==21536== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==21536== For more details, rerun with: -v
==21536==
==21536== Conditional jump or move depends on uninitialised value(s)
==21536==    at 0x1B8EE260: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8E6A01: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8F4F37: (within /lib/ld-2.3.5.so)
==21536==
==21536== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----
==21536==
==21536== Conditional jump or move depends on uninitialised value(s)
==21536==    at 0x1B8EE290: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8E6A01: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8F4F37: (within /lib/ld-2.3.5.so)
==21536==
==21536== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----
==21536==
==21536== Conditional jump or move depends on uninitialised value(s)
==21536==    at 0x1B8EE114: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8E6A01: (within /lib/ld-2.3.5.so)
==21536==    by 0x1B8F4F37: (within /lib/ld-2.3.5.so)

<SNIP> : in fact there are always 7 such sections

root@mercure:~# equery b /lib/ld-2.3.5.so
[ Searching for file(s) /lib/ld-2.3.5.so in *... ]
sys-libs/glibc-2.3.5 (/lib/ld-2.3.5.so)
root@mercure:~# emerge -vp sys-libs/glibc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-libs/glibc-2.3.5  -build -debug -erandom -hardened (-multilib) +nls -nomalloccheck +nptl -nptlonly -pic -userlocales 0 kB

Total size of downloads: 0 kB
root@mercure:~# emerge info
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11.10-vs2.0-rc2_mercure_03_vs i686)
=================================================================
System uname: 2.6.11.10-vs2.0-rc2_mercure_03_vs i686 AMD Athlon(tm) 4 Processor
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16-r1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_GB"
LC_ALL="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnowex X a52 aac aalib alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts bzlib cairo caps cdr cle266 cmov crypt cups curl cx8 dba de directfb divx4linux djbfft doc dpms dts dv dvb dvd dvdread elf emacs emboss encode escreen esd ethereal fbcon ffmpeg fftw flac font-server foomaticdb fortran fpu fpx ftp fxsr gd gdbm gif gnutls gpm graphviz gstreamer gtk gtk2 hdf5 imagemagick imlib ipv6 java javascript jbig jpeg kerberos krb4 lcms ldap libcaca libclamav libg++ libwww lirc live lzo mad matroska matrox mbox mca mce mikmod mmap mmx mng motif mp3 mpeg mpi msr mtrr mysql mythtv ncurses network nls nptl objc odbc ogg oggvorbis opengl oss pae pam pam_chroot pam_console pam_timestamp pat pcre pdflib perl pge plotutils png pnp posix postgres pse pse36 pwdb python qt quicktime readline real rrdtool rtc ruby samba sasl sdl sendfile sep serial skey slang sndfile snmp speex spell sse ssl streamzap svga sysfs syslog sysvipc tcpd tetex tga theora threads tiff truetype truetype-fonts tsc type1-fonts unicode v4l v4l2 vcd vidix vim vme vorbis win32codecs wmf xanim xine xinerama xml xml2 xmlrpc xmms xpm xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


I very heavily use valgrind everyday, and those warnings REALY feed me up.

-1- can you feedback upstream about that ?

-2- is there a workaround to ask valgrind NOT show warnings for the particular library ld.so ?

-3- is there a workaround ?
Comment 1 Maurice van der Pot (RETIRED) gentoo-dev 2005-06-26 08:29:02 UTC
> -1- can you feedback upstream about that ?

Upstream probably knows about those already. See below.

> -2- is there a workaround to ask valgrind NOT show warnings for the particular
library ld.so ?

Yes, that's possible. Look into suppression files:
http://valgrind.org/docs/manual/coregrind_core.html#suppress

> -3- is there a workaround ?

Here are 2 of them:

1) Do not strip glibc. Valgrind comes with several default suppression files
for glibc likely to mask the issues you see. The only problem is that those 
suppression files need function names in backtraces in order to suppress 
something properly. Stripping debugging info from glibc gives you backtraces 
without function names.

2) Create your own suppression file and use that with valgrind. The 
documentation tells you how to do this. You may however be masking other 
problems if you go for a suppression as general as "anything in ld-2.3.5.so".
Comment 2 Maurice van der Pot (RETIRED) gentoo-dev 2005-07-15 09:38:09 UTC
I'll mark this report INVALID, since stripping glibc obviously makes it 
impossible for valgrind to suppress the right messages.
If you disagree, please let me know.
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2005-08-03 12:14:07 UTC
yes I desagree

because the errors reported are about from memory:

jump deponds on uninitialised variable.

this means the glib can have unpredictable behaviour ... and valgrind shows up a
potential bug due to bad-coding.

valgrind only reveal 'problems' ... if code were clean, it would not complain. I
think you should mail upstream.

maybe those warnings are non fatal to me ... maybe they ll make crash other
applications soon.