|
From: Tom H. <th...@cy...> - 2003-10-16 22:38:19
|
In message <200...@su...>
Olly Betts <ol...@su...> wrote:
> Perhaps the small program which is currently built and run at configure
> time to check for NPTL should actually be built and installed (e.g. as
> /usr/lib/valgrind/nptlcheck) and then run from the valgrind wrapper
> script?
You don't need a special program - glibc already provides a way to
check using the getconf program, like this:
audi [~] % getconf GNU_LIBPTHREAD_VERSION
NPTL 0.34
on an RH8 box you get this:
ginetta [~] % getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10
and on an RH7.3 box before glibc added the variable, you get an error:
alvis [~] % getconf GNU_LIBPTHREAD_VERSION
getconf: Unrecognised variable `GNU_LIBPTHREAD_VERSION'
So using this line in the valgrind shell script in place of the current
solution should fix things:
getconf GNU_LIBPTHREAD_VERSION | grep -qi NPTL 2> /dev/null && \
LD_ASSUME_KERNEL=2.4.1
Note that you only need to go back to 2.4.1 and not 2.2.5 as it does
at the moment - as shown by this on an RH9 box:
audi [~] % LD_ASSUME_KERNEL=2.4.1 getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10
> AIUI, at present if the user builds and installs valgrind using a
> non-NPTL kernel and then upgrades to an NPTL kernel, valgrind won't
> disable NPTL. That seems a fairly common scenario. It'll also fail to
> disable NPTL if the user installs a valgrind package (RPM, deb, etc)
> built on a non-NPTL kernel machine.
All true.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|