This commit is contained in:
Jakub Jelinek 2011-02-23 12:20:36 +01:00
parent 68d687583e
commit 30f48606ea
23 changed files with 314 additions and 389 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
valgrind-3.6.0.tar.bz2
/valgrind-3.6.1.tar.bz2

View File

@ -1 +1 @@
b289c5f4ab8e39741602445f1dd09b34 valgrind-3.6.0.tar.bz2
2c3aa122498baecc9d69194057ca88f5 valgrind-3.6.1.tar.bz2

View File

@ -1,151 +0,0 @@
--- valgrind/VEX/priv/guest_amd64_toIR.c.jj 2010-10-20 22:19:51.000000000 +0200
+++ valgrind/VEX/priv/guest_amd64_toIR.c 2010-11-05 17:34:50.179705231 +0100
@@ -15957,17 +15957,19 @@ DisResult disInstr_AMD64_WRK (
case 0xE1: /* LOOPE disp8: decrement count, jump if count != 0 && ZF==1 */
case 0xE2: /* LOOP disp8: decrement count, jump if count != 0 */
{ /* The docs say this uses rCX as a count depending on the
- address size override, not the operand one. Since we don't
- handle address size overrides, I guess that means RCX. */
+ address size override, not the operand one. */
IRExpr* zbit = NULL;
IRExpr* count = NULL;
IRExpr* cond = NULL;
HChar* xtra = NULL;
- if (have66orF2orF3(pfx) || haveASO(pfx)) goto decode_failure;
+ if (have66orF2orF3(pfx)) goto decode_failure;
d64 = guest_RIP_bbstart+delta+1 + getSDisp8(delta);
delta++;
- putIReg64(R_RCX, binop(Iop_Sub64, getIReg64(R_RCX), mkU64(1)));
+ if (haveASO (pfx))
+ putIReg32(R_RCX, binop(Iop_Sub32, getIReg32(R_RCX), mkU32(1)));
+ else
+ putIReg64(R_RCX, binop(Iop_Sub64, getIReg64(R_RCX), mkU64(1)));
count = getIReg64(R_RCX);
cond = binop(Iop_CmpNE64, count, mkU64(0));
--- valgrind/none/tests/amd64/loopnel.c.jj 2010-11-05 17:34:50.180705082 +0100
+++ valgrind/none/tests/amd64/loopnel.c 2010-11-05 17:34:50.180705082 +0100
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int
+main (void)
+{
+ long rcx = 0x200000005UL;
+ long rax = 5UL;
+ asm volatile ("1: addq $1, %0; loopnel 1b" : "+a" (rax), "+c" (rcx) : : "cc");
+ printf ("%ld %ld\n", rax, rcx);
+ return 0;
+}
--- valgrind/none/tests/amd64/loopnel.vgtest.jj 2010-11-05 17:34:50.180705082 +0100
+++ valgrind/none/tests/amd64/loopnel.vgtest 2010-11-05 17:34:50.180705082 +0100
@@ -0,0 +1 @@
+prog: loopnel
--- valgrind/none/tests/amd64/loopnel.stdout.exp.jj 2010-11-05 17:34:50.181705073 +0100
+++ valgrind/none/tests/amd64/loopnel.stdout.exp 2010-11-05 17:34:50.181705073 +0100
@@ -0,0 +1 @@
+10 0
--- valgrind/none/tests/amd64/loopnel.stderr.exp.jj 2010-11-05 17:34:50.181705073 +0100
+++ valgrind/none/tests/amd64/loopnel.stderr.exp 2010-11-05 17:34:50.181705073 +0100
@@ -0,0 +1,2 @@
+
+
--- valgrind/none/tests/amd64/Makefile.am.jj 2010-10-20 22:19:31.000000000 +0200
+++ valgrind/none/tests/amd64/Makefile.am 2010-11-05 17:35:44.779455280 +0100
@@ -44,6 +44,7 @@ EXTRA_DIST = \
insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
jrcxz.stderr.exp jrcxz.stdout.exp jrcxz.vgtest \
looper.stderr.exp looper.stdout.exp looper.vgtest \
+ loopnel.stderr.exp loopnel.stdout.exp loopnel.vgtest \
lzcnt64.stderr.exp lzcnt64.stdout.exp lzcnt64.vgtest \
nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \
nibz_bennee_mmap.vgtest \
@@ -88,6 +89,7 @@ if ! VGCONF_OS_IS_DARWIN
fcmovnu \
fxtract \
looper \
+ loopnel \
jrcxz \
shrld \
slahf-amd64
--- valgrind/none/tests/amd64/Makefile.in.jj 2010-10-21 03:16:16.000000000 +0200
+++ valgrind/none/tests/amd64/Makefile.in 2010-11-05 17:36:25.698704330 +0100
@@ -66,6 +66,7 @@ check_PROGRAMS = amd64locked$(EXEEXT) bu
@VGCONF_OS_IS_DARWIN_FALSE@ fcmovnu \
@VGCONF_OS_IS_DARWIN_FALSE@ fxtract \
@VGCONF_OS_IS_DARWIN_FALSE@ looper \
+@VGCONF_OS_IS_DARWIN_FALSE@ loopnel \
@VGCONF_OS_IS_DARWIN_FALSE@ jrcxz \
@VGCONF_OS_IS_DARWIN_FALSE@ shrld \
@VGCONF_OS_IS_DARWIN_FALSE@ slahf-amd64
@@ -91,8 +92,9 @@ am__EXEEXT_4 = insn_basic$(EXEEXT) insn_
@VGCONF_OS_IS_DARWIN_FALSE@ bug156404-amd64$(EXEEXT) \
@VGCONF_OS_IS_DARWIN_FALSE@ faultstatus$(EXEEXT) \
@VGCONF_OS_IS_DARWIN_FALSE@ fcmovnu$(EXEEXT) fxtract$(EXEEXT) \
-@VGCONF_OS_IS_DARWIN_FALSE@ looper$(EXEEXT) jrcxz$(EXEEXT) \
-@VGCONF_OS_IS_DARWIN_FALSE@ shrld$(EXEEXT) slahf-amd64$(EXEEXT)
+@VGCONF_OS_IS_DARWIN_FALSE@ looper$(EXEEXT) loopnel$(EXEEXT) \
+@VGCONF_OS_IS_DARWIN_FALSE@ jrcxz$(EXEEXT) shrld$(EXEEXT) \
+@VGCONF_OS_IS_DARWIN_FALSE@ slahf-amd64$(EXEEXT)
amd64locked_SOURCES = amd64locked.c
amd64locked_OBJECTS = amd64locked-amd64locked.$(OBJEXT)
amd64locked_LDADD = $(LDADD)
@@ -158,6 +160,9 @@ jrcxz_LDADD = $(LDADD)
looper_SOURCES = looper.c
looper_OBJECTS = looper.$(OBJEXT)
looper_LDADD = $(LDADD)
+loopnel_SOURCES = loopnel.c
+loopnel_OBJECTS = loopnel.$(OBJEXT)
+loopnel_LDADD = $(LDADD)
lzcnt64_SOURCES = lzcnt64.c
lzcnt64_OBJECTS = lzcnt64.$(OBJEXT)
lzcnt64_LDADD = $(LDADD)
@@ -202,7 +207,7 @@ SOURCES = amd64locked.c bug127521-64.c b
faultstatus.c fcmovnu.c fxtract.c $(insn_basic_SOURCES) \
$(insn_fpu_SOURCES) $(insn_mmx_SOURCES) insn_pclmulqdq.c \
$(insn_sse_SOURCES) $(insn_sse2_SOURCES) $(insn_sse3_SOURCES) \
- $(insn_ssse3_SOURCES) jrcxz.c looper.c lzcnt64.c \
+ $(insn_ssse3_SOURCES) jrcxz.c looper.c loopnel.c lzcnt64.c \
nibz_bennee_mmap.c rcl-amd64.c redundantRexW.c sbbmisc.c \
shrld.c slahf-amd64.c smc1.c ssse3_misaligned.c xadd.c
DIST_SOURCES = amd64locked.c bug127521-64.c bug132813-amd64.c \
@@ -211,9 +216,9 @@ DIST_SOURCES = amd64locked.c bug127521-6
$(insn_basic_SOURCES) $(insn_fpu_SOURCES) $(insn_mmx_SOURCES) \
insn_pclmulqdq.c $(insn_sse_SOURCES) $(insn_sse2_SOURCES) \
$(insn_sse3_SOURCES) $(insn_ssse3_SOURCES) jrcxz.c looper.c \
- lzcnt64.c nibz_bennee_mmap.c rcl-amd64.c redundantRexW.c \
- sbbmisc.c shrld.c slahf-amd64.c smc1.c ssse3_misaligned.c \
- xadd.c
+ loopnel.c lzcnt64.c nibz_bennee_mmap.c rcl-amd64.c \
+ redundantRexW.c sbbmisc.c shrld.c slahf-amd64.c smc1.c \
+ ssse3_misaligned.c xadd.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -525,6 +530,7 @@ EXTRA_DIST = \
insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
jrcxz.stderr.exp jrcxz.stdout.exp jrcxz.vgtest \
looper.stderr.exp looper.stdout.exp looper.vgtest \
+ loopnel.stderr.exp loopnel.stdout.exp loopnel.vgtest \
lzcnt64.stderr.exp lzcnt64.stdout.exp lzcnt64.vgtest \
nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \
nibz_bennee_mmap.vgtest \
@@ -660,6 +666,9 @@ jrcxz$(EXEEXT): $(jrcxz_OBJECTS) $(jrcxz
looper$(EXEEXT): $(looper_OBJECTS) $(looper_DEPENDENCIES)
@rm -f looper$(EXEEXT)
$(LINK) $(looper_OBJECTS) $(looper_LDADD) $(LIBS)
+loopnel$(EXEEXT): $(loopnel_OBJECTS) $(loopnel_DEPENDENCIES)
+ @rm -f loopnel$(EXEEXT)
+ $(LINK) $(loopnel_OBJECTS) $(loopnel_LDADD) $(LIBS)
lzcnt64$(EXEEXT): $(lzcnt64_OBJECTS) $(lzcnt64_DEPENDENCIES)
@rm -f lzcnt64$(EXEEXT)
$(LINK) $(lzcnt64_OBJECTS) $(lzcnt64_LDADD) $(LIBS)
@@ -718,6 +727,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/insn_ssse3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jrcxz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/looper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loopnel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzcnt64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nibz_bennee_mmap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcl-amd64.Po@am__quote@

View File

@ -1,114 +0,0 @@
--- valgrind/memcheck/mc_replace_strmem.c.jj 2010-10-20 22:19:25.000000000 +0200
+++ valgrind/memcheck/mc_replace_strmem.c 2010-11-12 10:07:58.559830040 +0100
@@ -431,6 +430,111 @@ STRCMP(VG_Z_LD64_SO_1, strcmp
#endif
+#if defined(VGO_linux)
+extern int tolower (int);
+
+#define STRCASECMP(soname, fnname) \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2 ); \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2 ) \
+ { \
+ register unsigned char c1; \
+ register unsigned char c2; \
+ while (True) { \
+ c1 = tolower(*(unsigned char *)s1); \
+ c2 = tolower(*(unsigned char *)s2); \
+ if (c1 != c2) break; \
+ if (c1 == 0) break; \
+ s1++; s2++; \
+ } \
+ if (c1 < c2) return -1; \
+ if (c1 > c2) return 1; \
+ return 0; \
+ }
+
+STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp)
+STRCASECMP(VG_Z_LIBC_SONAME, __GI_strcasecmp)
+
+
+#define STRNCASECMP(soname, fnname) \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, SizeT nmax ); \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, SizeT nmax ) \
+ { \
+ register unsigned char c1; \
+ register unsigned char c2; \
+ SizeT n = 0; \
+ while (True) { \
+ if (n >= nmax) return 0; \
+ if (*s1 == 0 && *s2 == 0) return 0; \
+ if (*s1 == 0) return -1; \
+ if (*s2 == 0) return 1; \
+ c1 = tolower(*(unsigned char*)s1); \
+ c2 = tolower(*(unsigned char*)s2); \
+ if (c1 < c2) return -1; \
+ if (c1 > c2) return 1; \
+ s1++; s2++; n++; \
+ } \
+ }
+
+STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp)
+STRNCASECMP(VG_Z_LIBC_SONAME, __GI_strncasecmp)
+
+extern int tolower_l (int, void *) __attribute__((weak));
+
+#define STRCASECMP_L(soname, fnname) \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, void* l ); \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, void* l ) \
+ { \
+ register unsigned char c1; \
+ register unsigned char c2; \
+ while (True) { \
+ c1 = tolower_l(*(unsigned char *)s1, l); \
+ c2 = tolower_l(*(unsigned char *)s2, l); \
+ if (c1 != c2) break; \
+ if (c1 == 0) break; \
+ s1++; s2++; \
+ } \
+ if (c1 < c2) return -1; \
+ if (c1 > c2) return 1; \
+ return 0; \
+ }
+
+STRCASECMP_L(VG_Z_LIBC_SONAME, strcasecmp_l)
+STRCASECMP_L(VG_Z_LIBC_SONAME, __GI_strcasecmp_l)
+
+
+#define STRNCASECMP_L(soname, fnname) \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, SizeT nmax, void* l ); \
+ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( const char* s1, const char* s2, SizeT nmax, void* l ) \
+ { \
+ register unsigned char c1; \
+ register unsigned char c2; \
+ SizeT n = 0; \
+ while (True) { \
+ if (n >= nmax) return 0; \
+ if (*s1 == 0 && *s2 == 0) return 0; \
+ if (*s1 == 0) return -1; \
+ if (*s2 == 0) return 1; \
+ c1 = tolower_l(*(unsigned char*)s1, l); \
+ c2 = tolower_l(*(unsigned char*)s2, l); \
+ if (c1 < c2) return -1; \
+ if (c1 > c2) return 1; \
+ s1++; s2++; n++; \
+ } \
+ }
+
+STRNCASECMP_L(VG_Z_LIBC_SONAME, strncasecmp_l)
+STRNCASECMP_L(VG_Z_LIBC_SONAME, __GI_strncasecmp_l)
+#endif
+
+
#define MEMCHR(soname, fnname) \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n); \
void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n) \

View File

@ -0,0 +1,190 @@
--- valgrind/none/tests/amd64/gen_insn_test.pl.jj 2010-10-20 22:19:31.000000000 +0200
+++ valgrind/none/tests/amd64/gen_insn_test.pl 2011-02-22 18:36:34.767401963 +0100
@@ -628,7 +628,7 @@ while (<>)
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w|r(8|16|32|64)|mm|xmm)$/)
{
$result->{argnum} = $argnum++;
}
@@ -642,14 +642,6 @@ while (<>)
}
}
- foreach my $result (@results)
- {
- if ($result->{type} =~ /^(r(8|16|32|64)|mm|xmm)$/)
- {
- $result->{argnum} = $argnum++;
- }
- }
-
my $stateargnum = $argnum++;
print qq| char state\[108\];\n|;
@@ -689,8 +681,8 @@ while (<>)
}
elsif ($arg->{type} eq "xmm")
{
- print qq| \"movlps 0+%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
- print qq| \"movhps 8+%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movlps %$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movhps %H$arg->{argnum}, %%$arg->{register}\\n\"\n|;
}
elsif ($arg->{type} eq "st")
{
@@ -803,8 +795,8 @@ while (<>)
}
elsif ($result->{type} eq "xmm")
{
- print qq| \"movlps %%$result->{register}, 0+%$result->{argnum}\\n\"\n|;
- print qq| \"movhps %%$result->{register}, 8+%$result->{argnum}\\n\"\n|;
+ print qq| \"movlps %%$result->{register}, %$result->{argnum}\\n\"\n|;
+ print qq| \"movhps %%$result->{register}, %H$result->{argnum}\\n\"\n|;
}
elsif ($result->{type} eq "st")
{
@@ -852,11 +844,16 @@ while (<>)
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w|r(8|16|32|64)|mm)$/)
{
print qq|$prefix\"=m\" \($result->{name}\)|;
$prefix = ", ";
}
+ elsif ($result->{type} eq "xmm")
+ {
+ print qq|$prefix\"=o\" \($result->{name}\)|;
+ $prefix = ", ";
+ }
}
print qq|\n|;
@@ -867,20 +864,18 @@ while (<>)
{
if (defined($arg->{name}))
{
- print qq|$prefix\"m\" \($arg->{name}\)|;
+ if ($arg->{type} eq "xmm")
+ {
+ print qq|$prefix\"o\" \($arg->{name}\)|;
+ }
+ else
+ {
+ print qq|$prefix\"m\" \($arg->{name}\)|;
+ }
$prefix = ", ";
}
}
- foreach my $result (@results)
- {
- if ($result->{type} =~ /^(r(8|16|32|64)|mm|xmm)$/)
- {
- print qq|$prefix\"m\" \($result->{name}\)|;
- $prefix = ", ";
- }
- }
-
print qq|$prefix\"m\" \(state[0]\)\n|;
$prefix = " : ";
--- valgrind/none/tests/x86/gen_insn_test.pl.jj 2010-10-20 22:19:35.000000000 +0200
+++ valgrind/none/tests/x86/gen_insn_test.pl 2011-02-22 18:30:27.750683267 +0100
@@ -605,7 +605,7 @@ while (<>)
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w|r(8|16|32)|mm|xmm)$/)
{
$result->{argnum} = $argnum++;
}
@@ -619,14 +619,6 @@ while (<>)
}
}
- foreach my $result (@results)
- {
- if ($result->{type} =~ /^(r(8|16|32)|mm|xmm)$/)
- {
- $result->{argnum} = $argnum++;
- }
- }
-
my $stateargnum = $argnum++;
print qq| char state\[108\];\n|;
@@ -658,8 +650,8 @@ while (<>)
}
elsif ($arg->{type} eq "xmm")
{
- print qq| \"movlps 0%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
- print qq| \"movhps 8%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movlps %$arg->{argnum}, %%$arg->{register}\\n\"\n|;
+ print qq| \"movhps %H$arg->{argnum}, %%$arg->{register}\\n\"\n|;
}
elsif ($arg->{type} eq "st")
{
@@ -767,8 +759,8 @@ while (<>)
}
elsif ($result->{type} eq "xmm")
{
- print qq| \"movlps %%$result->{register}, 0%$result->{argnum}\\n\"\n|;
- print qq| \"movhps %%$result->{register}, 8%$result->{argnum}\\n\"\n|;
+ print qq| \"movlps %%$result->{register}, %$result->{argnum}\\n\"\n|;
+ print qq| \"movhps %%$result->{register}, %H$result->{argnum}\\n\"\n|;
}
elsif ($result->{type} eq "st")
{
@@ -817,11 +809,16 @@ while (<>)
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w|r(8|16|32)|mm)$/)
{
print qq|$prefix\"=m\" \($result->{name}\)|;
$prefix = ", ";
}
+ elsif ($result->{type} eq "xmm")
+ {
+ print qq|$prefix\"=o\" \($result->{name}\)|;
+ $prefix = ", ";
+ }
}
print qq|\n|;
@@ -832,20 +829,18 @@ while (<>)
{
if (defined($arg->{name}))
{
- print qq|$prefix\"m\" \($arg->{name}\)|;
+ if ($arg->{type} eq "xmm")
+ {
+ print qq|$prefix\"o\" \($arg->{name}\)|;
+ }
+ else
+ {
+ print qq|$prefix\"m\" \($arg->{name}\)|;
+ }
$prefix = ", ";
}
}
- foreach my $result (@results)
- {
- if ($result->{type} =~ /^(r(8|16|32)|mm|xmm)$/)
- {
- print qq|$prefix\"m\" \($result->{name}\)|;
- $prefix = ", ";
- }
- }
-
print qq|$prefix\"m\" \(state[0]\)\n|;
$prefix = " : ";

View File

@ -1,29 +1,12 @@
--- valgrind/configure.in.jj 2010-10-21 03:14:02.000000000 +0200
+++ valgrind/configure.in 2010-11-05 17:09:18.674455299 +0100
@@ -649,6 +649,16 @@ _ACEOF
GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is: //p' | $SED 's/ /./g'`"
fi
+AC_EGREP_CPP([GLIBC_213], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 13)
+ GLIBC_213
+ #endif
+#endif
+],
+GLIBC_VERSION="2.13")
+
AC_EGREP_CPP([AIX5_LIBC], [
#include <standards.h>
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -749,6 +759,13 @@ case "${GLIBC_VERSION}" in
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.13)
+ AC_MSG_RESULT(2.13 family)
+ AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x])
+ 2.14)
+ AC_MSG_RESULT(2.14 family)
+ AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
@ -35,64 +18,35 @@
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
;;
--- valgrind/config.h.in.jj 2010-10-20 22:20:49.000000000 +0200
+++ valgrind/config.h.in 2010-11-05 17:08:33.863454886 +0100
@@ -33,6 +33,9 @@
/* Define to 1 if you're using glibc 2.12.x */
#undef GLIBC_2_12
/* Define to 1 if you're using glibc 2.13.x */
#undef GLIBC_2_13
+/* Define to 1 if you're using glibc 2.13.x */
+#undef GLIBC_2_13
+/* Define to 1 if you're using glibc 2.14.x */
+#undef GLIBC_2_14
+
/* Define to 1 if you're using glibc 2.2.x */
#undef GLIBC_2_2
--- valgrind/configure.jj 2010-10-21 03:16:18.000000000 +0200
+++ valgrind/configure 2010-11-05 17:09:39.163455396 +0100
@@ -6220,6 +6220,28 @@ fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 13)
+ GLIBC_213
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GLIBC_213" >/dev/null 2>&1; then
+ GLIBC_VERSION="2.13"
+fi
+rm -f conftest*
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
#include <standards.h>
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
AIX5_LIBC
@@ -6367,6 +6389,18 @@ $as_echo "#define GLIBC_2_12 1" >>confde
@@ -6367,6 +6389,18 @@ $as_echo "#define GLIBC_2_13 1" >>confde
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.13)
+ echo "$as_me:$LINENO: result: 2.13 family" >&5
+echo "${ECHO_T}2.13 family" >&6
+ 2.14)
+ echo "$as_me:$LINENO: result: 2.14 family" >&5
+echo "${ECHO_T}2.14 family" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define GLIBC_2_13 1
+#define GLIBC_2_14 1
+_ACEOF
+
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
@ -106,8 +60,8 @@
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
- as_fn_error "Valgrind requires glibc version 2.2 - 2.12" "$LINENO" 5
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.13" "$LINENO" 5
- as_fn_error "Valgrind requires glibc version 2.2 - 2.13" "$LINENO" 5
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.14" "$LINENO" 5
as_fn_error "or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION" "$LINENO" 5
as_fn_error "or Darwin libc" "$LINENO" 5
;;

View File

@ -4505,43 +4505,7 @@
VGCONF_OS_IS_LINUX_TRUE=
VGCONF_OS_IS_LINUX_FALSE='#'
else
@@ -6229,17 +6270,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "GLIBC_213" >/dev/null 2>&1; then
+ $EGREP "GLIBC_213" >/dev/null 2>&1; then :
GLIBC_VERSION="2.13"
fi
rm -f conftest*
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <standards.h>
@@ -6390,12 +6427,10 @@ $as_echo "#define GLIBC_2_12 1" >>confde
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
2.13)
- echo "$as_me:$LINENO: result: 2.13 family" >&5
-echo "${ECHO_T}2.13 family" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.13 family" >&5
+$as_echo "2.13 family" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define GLIBC_2_13 1
-_ACEOF
+$as_echo "#define GLIBC_2_13 1" >>confdefs.h
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
@@ -8442,7 +8477,8 @@ if test x$VGCONF_PLATFORM_PRI_CAPS = xX8
@@ -8418,7 +8459,8 @@ if test x$VGCONF_PLATFORM_PRI_CAPS = xX8
-o x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_LINUX ; then
mflag_primary=$FLAG_M32
elif test x$VGCONF_PLATFORM_PRI_CAPS = xAMD64_LINUX \
@ -4551,7 +4515,7 @@
mflag_primary=$FLAG_M64
elif test x$VGCONF_PLATFORM_PRI_CAPS = xPPC32_AIX5 ; then
mflag_primary=-q32
@@ -9177,7 +9213,7 @@ fi
@@ -9153,7 +9195,7 @@ fi
#----------------------------------------------------------------------------
# Nb: VEX/Makefile is generated from Makefile.vex.in.
@ -4560,7 +4524,7 @@
ac_config_files="$ac_config_files coregrind/link_tool_exe_linux"
@@ -9330,6 +9366,10 @@ if test -z "${VGCONF_ARCHS_INCLUDE_ARM_T
@@ -9306,6 +9348,10 @@ if test -z "${VGCONF_ARCHS_INCLUDE_ARM_T
as_fn_error "conditional \"VGCONF_ARCHS_INCLUDE_ARM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@ -4571,7 +4535,7 @@
if test -z "${VGCONF_PLATFORMS_INCLUDE_X86_LINUX_TRUE}" && test -z "${VGCONF_PLATFORMS_INCLUDE_X86_LINUX_FALSE}"; then
as_fn_error "conditional \"VGCONF_PLATFORMS_INCLUDE_X86_LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -9350,6 +9390,10 @@ if test -z "${VGCONF_PLATFORMS_INCLUDE_A
@@ -9326,6 +9372,10 @@ if test -z "${VGCONF_PLATFORMS_INCLUDE_A
as_fn_error "conditional \"VGCONF_PLATFORMS_INCLUDE_ARM_LINUX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@ -4582,7 +4546,7 @@
if test -z "${VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5_TRUE}" && test -z "${VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5_FALSE}"; then
as_fn_error "conditional \"VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -10094,6 +10138,7 @@ do
@@ -10070,6 +10120,7 @@ do
"none/tests/ppc64/Makefile") CONFIG_FILES="$CONFIG_FILES none/tests/ppc64/Makefile" ;;
"none/tests/x86/Makefile") CONFIG_FILES="$CONFIG_FILES none/tests/x86/Makefile" ;;
"none/tests/arm/Makefile") CONFIG_FILES="$CONFIG_FILES none/tests/arm/Makefile" ;;

View File

@ -0,0 +1,78 @@
--- valgrind-3.6.1/coregrind/m_trampoline.S.jj 2011-02-22 15:47:55.000000000 +0100
+++ valgrind-3.6.1/coregrind/m_trampoline.S 2011-02-23 11:32:20.923402349 +0100
@@ -112,6 +112,27 @@ VG_(x86_linux_REDIR_FOR_index):
ret
.size VG_(x86_linux_REDIR_FOR_index), .-VG_(x86_linux_REDIR_FOR_index)
+/* There's no particular reason that this needs to be handwritten
+ assembly, but since that's what this file contains, here's a
+ simple strlen implementation (written in C and compiled by gcc.)
+*/
+.global VG_(x86_linux_REDIR_FOR_strlen)
+.type VG_(x86_linux_REDIR_FOR_strlen), @function
+VG_(x86_linux_REDIR_FOR_strlen):
+ pushl %ebp
+ movl %esp, %ebp
+ movl 8(%ebp), %edx
+ movl %edx, %eax
+ jmp 2f
+1: incl %eax
+2: cmpb $0, (%eax)
+ jne 1b
+ subl %edx, %eax
+ popl %ebp
+ ret
+.size VG_(x86_linux_REDIR_FOR_strlen), .-VG_(x86_linux_REDIR_FOR_strlen)
+
+
.global VG_(trampoline_stuff_end)
VG_(trampoline_stuff_end):
--- valgrind-3.6.1/coregrind/pub_core_trampoline.h.jj 2011-02-22 15:47:55.000000000 +0100
+++ valgrind-3.6.1/coregrind/pub_core_trampoline.h 2011-02-23 11:25:40.350402084 +0100
@@ -60,6 +60,7 @@ extern Addr VG_(trampoline_stuff_end);
extern Addr VG_(x86_linux_SUBST_FOR_sigreturn);
extern Addr VG_(x86_linux_SUBST_FOR_rt_sigreturn);
extern Char* VG_(x86_linux_REDIR_FOR_index) ( const Char*, Int );
+extern UInt VG_(x86_linux_REDIR_FOR_strlen)( void* );
#endif
#if defined(VGP_amd64_linux)
--- valgrind-3.6.1/coregrind/m_redir.c.jj 2011-02-22 15:51:02.000000000 +0100
+++ valgrind-3.6.1/coregrind/m_redir.c 2011-02-23 11:24:33.502670646 +0100
@@ -924,20 +924,23 @@ void VG_(redir_initialise) ( void )
/* If we're using memcheck, use this intercept right from the
start, otherwise ld.so (glibc-2.3.5) makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+ const HChar** mandatory;
+# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \
+ || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \
+ || defined(GLIBC_2_8) || defined(GLIBC_2_9) \
+ || defined(GLIBC_2_10) || defined(GLIBC_2_11)
+ mandatory = NULL;
+# else
+ /* for glibc-2.12 and later, this is mandatory - can't sanely
+ continue without it */
+ mandatory = complain_about_stripped_glibc_ldso;
+# endif
add_hardwired_spec(
"ld-linux.so.2", "index",
- (Addr)&VG_(x86_linux_REDIR_FOR_index),
-# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \
- || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \
- || defined(GLIBC_2_8) || defined(GLIBC_2_9) \
- || defined(GLIBC_2_10) || defined(GLIBC_2_11)
- NULL
-# else
- /* for glibc-2.12 and later, this is mandatory - can't sanely
- continue without it */
- complain_about_stripped_glibc_ldso
-# endif
- );
+ (Addr)&VG_(x86_linux_REDIR_FOR_index), mandatory);
+ add_hardwired_spec(
+ "ld-linux.so.2", "strlen",
+ (Addr)&VG_(x86_linux_REDIR_FOR_strlen), mandatory);
}
# elif defined(VGP_amd64_linux)

View File

@ -1,27 +1,27 @@
Summary: Tool for finding memory management bugs in programs
Name: valgrind
Version: 3.6.0
Release: 3%{?dist}
Version: 3.6.1
Release: 1%{?dist}
Epoch: 1
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.6.0-cachegrind-improvements.patch
Patch2: valgrind-3.6.0-openat.patch
Patch3: valgrind-3.6.0-glibc-2.10.1.patch
Patch4: valgrind-3.6.0-helgrind-race-supp.patch
Patch5: valgrind-3.6.0-amd64-loopnel.patch
Patch6: valgrind-3.6.0-stat_h.patch
Patch7: valgrind-3.6.0-config_h.patch
Patch8: valgrind-3.6.0-capget.patch
Patch9: valgrind-3.6.0-glibc-2.13.patch
Patch10: valgrind-3.6.0-s390x-1.patch
Patch11: valgrind-3.6.0-s390x-2.patch
Patch12: valgrind-3.6.0-s390x-3.patch
Patch13: valgrind-3.6.0-s390x-4.patch
Patch14: valgrind-3.6.0-strcasecmp.patch
Patch15: valgrind-3.6.0-xlc_dbl_u32-test-patch
Patch16: valgrind-3.6.0-helgrind-tests.patch
Patch17: valgrind-3.6.0-ppc64-pwrite64.patch
Patch18: valgrind-3.6.0-pie.patch
Patch1: valgrind-3.6.1-cachegrind-improvements.patch
Patch2: valgrind-3.6.1-openat.patch
Patch3: valgrind-3.6.1-glibc-2.10.1.patch
Patch4: valgrind-3.6.1-helgrind-race-supp.patch
Patch5: valgrind-3.6.1-stat_h.patch
Patch6: valgrind-3.6.1-config_h.patch
Patch7: valgrind-3.6.1-capget.patch
Patch8: valgrind-3.6.1-glibc-2.14.patch
Patch9: valgrind-3.6.1-s390x-1.patch
Patch10: valgrind-3.6.1-s390x-2.patch
Patch11: valgrind-3.6.1-s390x-3.patch
Patch12: valgrind-3.6.1-s390x-4.patch
Patch13: valgrind-3.6.1-xlc_dbl_u32-test.patch
Patch14: valgrind-3.6.1-helgrind-tests.patch
Patch15: valgrind-3.6.1-ppc64-pwrite64.patch
Patch16: valgrind-3.6.1-pie.patch
Patch17: valgrind-3.6.1-gen_insn_test.patch
Patch18: valgrind-3.6.1-x86-ldso-strlen.patch
License: GPLv2
URL: http://www.valgrind.org/
Group: Development/Debuggers
@ -215,6 +215,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Wed Feb 23 2011 Jakub Jelinek <jakub@redhat.com> 3.6.1-1
- update to 3.6.1
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild