This commit is contained in:
Jakub Jelinek 2010-04-12 13:17:41 +00:00
parent 0332e150c8
commit 7d17c10188
4 changed files with 70 additions and 4 deletions

View File

@ -1,2 +1,3 @@
valgrind-3_4_0-1:HEAD:valgrind-3.4.0-1.src.rpm:1234005462 valgrind-3_4_0-1:HEAD:valgrind-3.4.0-1.src.rpm:1234005462
valgrind-3_5_0-15_fc14:HEAD:valgrind-3.5.0-15.fc14.src.rpm:1270651054 valgrind-3_5_0-15_fc14:HEAD:valgrind-3.5.0-15.fc14.src.rpm:1270651054
valgrind-3_5_0-16_fc14:HEAD:valgrind-3.5.0-16.fc14.src.rpm:1271078244

View File

@ -0,0 +1,14 @@
--- valgrind-3.5.0/coregrind/m_syswrap/syswrap-linux.c.jj 2010-04-07 08:14:12.000000000 -0400
+++ valgrind-3.5.0/coregrind/m_syswrap/syswrap-linux.c 2010-04-12 07:24:12.838876000 -0400
@@ -1955,8 +1955,9 @@ PRE(sys_capget)
vki_cap_user_header_t, header, vki_cap_user_data_t, data);
PRE_MEM_READ( "capget(header)", ARG1,
sizeof(struct __vki_user_cap_header_struct) );
- PRE_MEM_WRITE( "capget(data)", ARG2,
- sizeof(struct __vki_user_cap_data_struct) );
+ if (ARG2 != (Addr)NULL)
+ PRE_MEM_WRITE( "capget(data)", ARG2,
+ sizeof(struct __vki_user_cap_data_struct) );
}
POST(sys_capget)
{

View File

@ -0,0 +1,22 @@
--- valgrind-3.5.0/include/pub_tool_basics.h.jj 2009-08-19 09:37:08.000000000 -0400
+++ valgrind-3.5.0/include/pub_tool_basics.h 2010-04-09 06:10:59.047422000 -0400
@@ -49,10 +49,6 @@
// For varargs types
#include <stdarg.h>
-/* For HAVE_BUILTIN_EXPECT */
-#include "config.h"
-
-
/* ---------------------------------------------------------------------
symbol prefixing
------------------------------------------------------------------ */
@@ -315,7 +311,7 @@ static inline Bool sr_EQ ( SysRes sr1, S
#define VG_BUGS_TO "www.valgrind.org"
/* Branch prediction hints. */
-#if HAVE_BUILTIN_EXPECT
+#if defined(__GNUC__) && (__GNUC__ >= 3)
# define LIKELY(x) __builtin_expect(!!(x), 1)
# define UNLIKELY(x) __builtin_expect((x), 0)
#else

View File

@ -1,7 +1,7 @@
Summary: Tool for finding memory management bugs in programs Summary: Tool for finding memory management bugs in programs
Name: valgrind Name: valgrind
Version: 3.5.0 Version: 3.5.0
Release: 15%{?dist} Release: 16%{?dist}
Epoch: 1 Epoch: 1
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2 Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.5.0-cachegrind-improvements.patch Patch1: valgrind-3.5.0-cachegrind-improvements.patch
@ -29,6 +29,8 @@ Patch22: valgrind-3.5.0-stat_h.patch
Patch23: valgrind-3.5.0-i686-nops.patch Patch23: valgrind-3.5.0-i686-nops.patch
Patch24: valgrind-3.5.0-dwarf4.patch Patch24: valgrind-3.5.0-dwarf4.patch
Patch25: valgrind-3.5.0-syscalls3.patch Patch25: valgrind-3.5.0-syscalls3.patch
Patch26: valgrind-3.5.0-config_h.patch
Patch27: valgrind-3.5.0-capget.patch
License: GPLv2 License: GPLv2
URL: http://www.valgrind.org/ URL: http://www.valgrind.org/
Group: Development/Debuggers Group: Development/Debuggers
@ -39,6 +41,7 @@ Obsoletes: valgrind-callgrind
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
%endif %endif
BuildRequires: glibc-devel >= 2.11 BuildRequires: glibc-devel >= 2.11
BuildRequires: openmpi-devel >= 1.3.3
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ExclusiveArch: %{ix86} x86_64 ppc ppc64
%ifarch %{ix86} %ifarch %{ix86}
%define valarch x86 %define valarch x86
@ -80,6 +83,16 @@ Requires: valgrind = %{epoch}:%{version}-%{release}
Header files and libraries for development of valgrind aware programs Header files and libraries for development of valgrind aware programs
or valgrind plugins. or valgrind plugins.
%package openmpi
Summary: OpenMPI support for valgrind
Group: Development/Debuggers
Requires: valgrind = %{epoch}:%{version}-%{release}
%description openmpi
A wrapper library for debugging OpenMPI parallel programs with valgrind.
See file:///usr/share/doc/valgrind-%{version}/html/mc-manual.html#mc-manual.mpiwrap
for details.
%prep %prep
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
@ -107,6 +120,7 @@ or valgrind plugins.
%patch23 -p1 %patch23 -p1
%patch24 -p1 %patch24 -p1
%patch25 -p1 %patch25 -p1
%patch27 -p1
%build %build
%ifarch x86_64 ppc64 %ifarch x86_64 ppc64
@ -114,9 +128,9 @@ or valgrind plugins.
mkdir -p libgcc/32 mkdir -p libgcc/32
ar r libgcc/32/libgcc_s.a ar r libgcc/32/libgcc_s.a
ar r libgcc/libgcc_s_32.a ar r libgcc/libgcc_s_32.a
%configure CC="gcc -B `pwd`/libgcc/" GDB=%{_bindir}/gdb %configure CC="gcc -B `pwd`/libgcc/" GDB=%{_bindir}/gdb --with-mpicc=%{_libdir}/openmpi/bin/mpicc
%else %else
%configure GDB=%{_bindir}/gdb %configure GDB=%{_bindir}/gdb --with-mpicc=%{_libdir}/openmpi/bin/mpicc
%endif %endif
make %{?_smp_mflags} make %{?_smp_mflags}
@ -172,6 +186,10 @@ popd
rm -f $RPM_BUILD_ROOT%{_libdir}/valgrind/*.supp.in rm -f $RPM_BUILD_ROOT%{_libdir}/valgrind/*.supp.in
cd $RPM_BUILD_ROOT%{_includedir}/valgrind
patch < %{PATCH26}
rm -f *.orig
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -181,7 +199,8 @@ rm -rf $RPM_BUILD_ROOT
%doc docs.installed/html docs.installed/*.pdf %doc docs.installed/html docs.installed/*.pdf
%{_bindir}/* %{_bindir}/*
%dir %{_libdir}/valgrind %dir %{_libdir}/valgrind
%{_libdir}/valgrind/*[^a] %{_libdir}/valgrind/*[^ao]
%{_libdir}/valgrind/[^l]*o
%{_mandir}/man1/* %{_mandir}/man1/*
%files devel %files devel
@ -191,7 +210,17 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/valgrind/*.a %{_libdir}/valgrind/*.a
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%files openmpi
%defattr(-,root,root)
%dir %{_libdir}/valgrind
%{_libdir}/valgrind/libmpiwrap*.so
%changelog %changelog
* Mon Apr 12 2010 Jakub Jelinek <jakub@redhat.com> 3.5.0-16
- change pub_tool_basics.h not to include config.h (#579283)
- add valgrind-openmpi package for OpenMPI support (#565541)
- allow NULL second argument to capget (#450976)
* Wed Apr 7 2010 Jakub Jelinek <jakub@redhat.com> 3.5.0-15 * Wed Apr 7 2010 Jakub Jelinek <jakub@redhat.com> 3.5.0-15
- handle i686 nopw insns with more than one data16 prefix (#574889) - handle i686 nopw insns with more than one data16 prefix (#574889)
- DWARF4 support - DWARF4 support