Glibc tries to read beyond the end of an allocated block. Reproducible: Always Steps to Reproduce: 1. Save the following program as "main.c": #include <dlfcn.h> int main () { dlopen ("Q", RTLD_LAZY); return 0; } 2. Execute "gcc main.c -o main -g -Wall -Wextra -ldl". 3. Execute "valgrind ./main". Actual Results: Invalid read of size 4 at 0x4015463: (within /lib/ld-2.6.1.so) by 0x4048C4C: (within /lib/libdl-2.6.1.so) by 0x400D8C1: (within /lib/ld-2.6.1.so) by 0x40490EB: (within /lib/libdl-2.6.1.so) by 0x4048B80: dlopen (in /lib/libdl-2.6.1.so) by 0x8048438: main (main.c:3) Address 0x417d048 is 32 bytes inside a block of size 33 alloc'd at 0x4023E2F: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) by 0x400D9D6: (within /lib/ld-2.6.1.so) by 0x4008A20: (within /lib/ld-2.6.1.so) by 0x4011933: (within /lib/ld-2.6.1.so) by 0x400D8C1: (within /lib/ld-2.6.1.so) by 0x401131D: (within /lib/ld-2.6.1.so) by 0x4048C4C: (within /lib/libdl-2.6.1.so) by 0x400D8C1: (within /lib/ld-2.6.1.so) by 0x40490EB: (within /lib/libdl-2.6.1.so) by 0x4048B80: dlopen (in /lib/libdl-2.6.1.so) by 0x8048438: main (main.c:3) This indicates a serious problem. The program is reading outside the allocated block. Under some circumstances, the program may still work as intended, because the program happens to be allowed to read that particular memory region (and it does not use the bytes originating from outside the block). But in the general case it will cause a segmentation fault.
emerge --info please.
% emerge --info Portage 2.1.4.4 (default-linux/x86, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 i686) ================================================================= System uname: 2.6.23-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.60GHz Timestamp of tree: Sat, 23 Feb 2008 14:30:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium-m -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O3 -march=pentium-m -fomit-frame-pointer -pipe" DISTDIR="/portage_tmpdir/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/" LANG="swedish" LINGUAS="sv de" PKGDIR="/portage_tmpdir/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/portage_tmpdir" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d a52 aac acl acpi ada alsa apache2 arts athena audiofile authdaemond bash-completion berkdb bitmap-fonts bzip2 canna cdda cddb cdio cdparanoia cli cracklib crypt css cups curl dga dhcp directfb doc dri dts dvb dvd dvdread emacs encode expat fam fbcon ffmpeg firefox flac fortran freewnn gd ggi gif gmp gnutls gpm guile hal howl httpd i8x0 iconv imlib ipv6 isdnlog javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kerberos krb4 lcms leim lesstif libg++ libsamplerate mad matroska midi mikmod mjpeg mmx mmx2 mng moznocompose moznoirc moznomail moznoroaming mp3 mpeg mudflap mule musepack musicbrainz mysql ncurses nls no-old-linux nptl nptlonly nsplugin odbc ogg openexr opengl openmp pam pcmcia pcre pdf perl php physfs png portaudio postgres povray pppd python qt3 qt4 quicktime quotas readline reflection samba sasl sdl session slp sndfile speex spell spl sql sse sse2 ssl stream subversion svg tcpd theora tidy tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vcd vda vorbis wifi win32codecs wma wmf x86 xanim xface xine xinerama xml xorg xv zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv de" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Reopen...
i see no such warning with glibc-2.7