Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105184 - dev-util/valgrind does not work with the 1g_lowmem_i386 kernel patch
Summary: dev-util/valgrind does not work with the 1g_lowmem_i386 kernel patch
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 13:46 UTC by Ira Snyder
Modified: 2005-09-07 16:20 UTC (History)
0 users

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


Attachments
valgrind_1GLowmem.patch (valgrind_1GLowmem.patch,600 bytes, patch)
2005-09-07 13:47 UTC, Ira Snyder
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ira Snyder 2005-09-07 13:46:16 UTC
Valgrind fails to start if the 1g_lowmem_i386 kernel patch (used in the ck
patchset. Look here for details:
http://members.optusnet.com.au/ckolivas/kernel/) is being used.

Valgrind fails with a memory error, and says that it cannot load stage2.

Based on a patch given here
(http://sourceforge.net/mailarchive/message.php?msg_id=10683243) I have created
a patch which makes valgrind work on my ck-sources based kernel.

The patch should only be applied if the 1g_lowmem_i386 patch is applied (and
enabled). I don't know how to do this, so I modified my ebuild to blindly apply it.

The kernel config option that is enabled with the 1g_lowmem_i386 patch is:
CONFIG_1GLOWMEM=y

Reproducible: Always
Steps to Reproduce:
1. Compile and boot a kernel with the 1g_lowmem_i386 patch enabled.
2. emerge valgrind
3. run valgrind, and watch it fail to start

Actual Results:  
Valgrind fails to start, with an error message similar to:

# valgrind
Executable range 0xb0000000-0xb01f4b40 is outside the
acceptable range 0x80d0000-0x7ffff000
valgrind: failed to load /usr/lib/valgrind/stage2: Cannot allocate memory

Expected Results:  
Valgrind should have been able to start.

irasnyd@yuki ~ $ emerge info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-archck1 i686)
=================================================================
System uname: 2.6.13-archck1 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.12.0_pre8
ccache version 2.4 [disabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe -fforce-addr -fweb
-ftracer -funit-at-a-time"
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/env.d"
CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe -fforce-addr -fweb
-ftracer -funit-at-a-time -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks fixpackages sandbox sfperms strict userpriv
usersandbox"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://gentoo.llarian.net/
http://gentoo.osuosl.org/ http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentopia"
SYNC="rsync://irasnyd.homelinux.com/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac alsa ao apm avi berkdb bzip2 cdr crypt cups
curl dbus dvd dvdr dvdread emboss fam fbcon ffmpeg flac freetype gdbm gif
gimpprint gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal imagemagick imlib java jpeg
kde kdeenablefinal libg++ libwww mad matroska mikmod mmap mmx mmxext mozilla mp3
mpeg ncurses no_wxgtk1 nowebdav nptl nptlonly offensive ogg oggvorbis opengl pam
pdflib perl png python qt quicktime readline real scanner sdl slang spell sse
ssl tcpd theora threads truetype truetype-fonts unicode usb userlocales vorbis
win32codecs wxwindows xine xml2 xmms xprint xv xvid zlib video_cards_radeon
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LINGUAS, MAKEOPTS
Comment 1 Ira Snyder 2005-09-07 13:47:48 UTC
Created attachment 67865 [details, diff]
valgrind_1GLowmem.patch

This is my patch that fixes the problem. It allows valgrind to start with the
1g_lowmem_i386 patch applied to the kernel.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2005-09-07 16:20:11 UTC
ck-sources are not supported