rpms/valgrind/devel valgrind-3.4.1-dwarf3.patch, NONE, 1.1 valgrind-3.4.1-glibc-2.10.1.patch, NONE, 1.1 valgrind-3.4.1-x86_64-ldso-strlen.patch, NONE, 1.1 valgrind.spec, 1.62, 1.63

Jakub Jelinek jakub at fedoraproject.org
Mon Jul 13 11:31:19 UTC 2009


Author: jakub

Update of /cvs/pkgs/rpms/valgrind/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22130

Modified Files:
	valgrind.spec 
Added Files:
	valgrind-3.4.1-dwarf3.patch valgrind-3.4.1-glibc-2.10.1.patch 
	valgrind-3.4.1-x86_64-ldso-strlen.patch 
Log Message:
3.4.1-4

valgrind-3.4.1-dwarf3.patch:

--- NEW FILE valgrind-3.4.1-dwarf3.patch ---
--- valgrind/coregrind/m_debuginfo/readdwarf3.c.jj	2009-07-13 12:15:20.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/readdwarf3.c	2009-07-13 13:16:23.000000000 +0200
@@ -1322,8 +1322,8 @@ void read_filename_table( /*MOD*/D3VarPa
       get_Initial_Length( &is_dw64, &c,
            "read_filename_table: invalid initial-length field" );
    version = get_UShort( &c );
-   if (version != 2)
-     cc->barf("read_filename_table: Only DWARF version 2 line info "
+   if (version != 2 && version != 3)
+     cc->barf("read_filename_table: Only DWARF version 2 and 3 line info "
               "is currently supported.");
    /*header_length              = (ULong)*/ get_Dwarfish_UWord( &c, is_dw64 );
    /*minimum_instruction_length = */ get_UChar( &c );
--- valgrind/coregrind/m_debuginfo/readdwarf.c.jj	2009-07-13 12:15:20.000000000 +0200
+++ valgrind/coregrind/m_debuginfo/readdwarf.c	2009-07-13 13:17:52.000000000 +0200
@@ -512,9 +512,9 @@ void read_dwarf2_lineblock ( struct _Deb
       VG_(printf)("  DWARF Version:               %d\n", 
                   (Int)info.li_version);
 
-   if (info.li_version != 2) {
+   if (info.li_version != 2 && info.li_version != 3) {
       ML_(symerr)(di, True,
-                  "Only DWARF version 2 line info "
+                  "Only DWARF version 2 and 3 line info "
                   "is currently supported.");
       goto out;
    }
@@ -1162,7 +1162,7 @@ void ML_(read_debuginfo_dwarf3)
 
       /* version should be 2 */
       ver = *((UShort*)( block_img + blklen_len ));
-      if ( ver != 2 ) {
+      if ( ver != 2 && ver != 3 ) {
          ML_(symerr)( di, True,
                       "Ignoring non-dwarf2 block in .debug_info" );
          continue;
@@ -3575,8 +3575,8 @@ void ML_(read_callframe_info_dwarf3)
             VG_(printf)("cie.version     = %d\n", (Int)cie_version);
          if (di->ddump_frames)
             VG_(printf)("  Version:               %d\n", (Int)cie_version);
-         if (cie_version != 1) {
-            how = "unexpected CIE version (not 1)";
+         if (cie_version != 1 && cie_version != 3) {
+            how = "unexpected CIE version (not 1 nor 3)";
             goto bad;
          }
 

valgrind-3.4.1-glibc-2.10.1.patch:

--- NEW FILE valgrind-3.4.1-glibc-2.10.1.patch ---
--- valgrind-3.4.1/glibc-2.X.supp.in.jj	2009-03-01 17:04:51.000000000 -0500
+++ valgrind-3.4.1/glibc-2.X.supp.in	2009-05-11 11:17:35.605396000 -0400
@@ -168,9 +168,9 @@
    Memcheck:Param
    socketcall.sendto(msg)
    fun:__sendto_nocancel
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
 }
 {
    glibc24-64bit-padding-1c
@@ -180,7 +180,7 @@
    fun:__nscd_get_map_ref
    fun:nscd_get*_r
    fun:*nscd*
-   obj:/*libc- at GLIBC_VERSION@.so
+   obj:/*libc- at GLIBC_VERSION@*.so
 }
 
 
@@ -199,18 +199,18 @@
    Memcheck:Param
    socketcall.sendto(msg)
    fun:send
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
 }
 {
    X11-64bit-padding-4b
    Memcheck:Param
    socketcall.send(msg)
    fun:send
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
-   obj:/*libc- at GLIBC_VERSION@.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
+   obj:/*libc- at GLIBC_VERSION@*.so
 }
 
 ##----------------------------------------------------------------------##

valgrind-3.4.1-x86_64-ldso-strlen.patch:

--- NEW FILE valgrind-3.4.1-x86_64-ldso-strlen.patch ---
--- valgrind/coregrind/pub_core_trampoline.h.jj	2009-04-22 12:10:54.000000000 +0200
+++ valgrind/coregrind/pub_core_trampoline.h	2009-04-22 14:50:39.000000000 +0200
@@ -66,6 +66,7 @@ extern Char* VG_(x86_linux_REDIR_FOR_ind
 extern void VG_(amd64_linux_SUBST_FOR_rt_sigreturn);
 extern void VG_(amd64_linux_REDIR_FOR_vgettimeofday);
 extern void VG_(amd64_linux_REDIR_FOR_vtime);
+extern UInt VG_(amd64_linux_REDIR_FOR_strlen)( void* );
 #endif
 
 #if defined(VGP_ppc32_linux)
--- valgrind/coregrind/m_redir.c.jj	2009-04-22 12:10:54.000000000 +0200
+++ valgrind/coregrind/m_redir.c	2009-04-22 15:32:19.000000000 +0200
@@ -879,6 +879,20 @@ void VG_(redir_initialise) ( void )
       (Addr)&VG_(amd64_linux_REDIR_FOR_vtime) 
    );
 
+   /* If we're using memcheck, use these intercepts right from
+      the start, otherwise ld.so makes a lot of noise. */
+   if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+
+      static const HChar croakage[]
+        = "Possible fix: install glibc's debuginfo package on this machine.";
+
+      /* this is mandatory - can't sanely continue without it */
+      add_hardwired_spec(
+         "ld-linux-x86-64.so.2", "strlen",
+         (Addr)&VG_(amd64_linux_REDIR_FOR_strlen),
+         croakage
+      );   
+   }
 #  elif defined(VGP_ppc32_linux)
    {
    static const HChar croakage[]
--- valgrind/coregrind/m_trampoline.S.jj	2009-04-22 12:10:54.000000000 +0200
+++ valgrind/coregrind/m_trampoline.S	2009-04-22 15:18:37.000000000 +0200
@@ -174,7 +174,29 @@ VG_(amd64_linux_REDIR_FOR_vtime):
 .LfnE3:
 .size VG_(amd64_linux_REDIR_FOR_vtime), .-.LfnB3
 
-/* A CIE for the above two functions, followed by their FDEs */
+/* 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_(amd64_linux_REDIR_FOR_strlen)
+.type   VG_(amd64_linux_REDIR_FOR_strlen), @function
+VG_(amd64_linux_REDIR_FOR_strlen):
+.LfnB4:
+	xorl	%eax, %eax
+	cmpb	$0, (%rdi)
+	movq	%rdi, %rdx
+	je	.L41
+.L40:	addq	$1, %rdx
+	cmpb	$0, (%rdx)
+	jne	.L40
+	movq	%rdx, %rax
+	subq	%rdi, %rax
+.L41:	ret
+.LfnE4:
+.size VG_(amd64_linux_REDIR_FOR_strlen), .-VG_(amd64_linux_REDIR_FOR_strlen)
+
+
+/* A CIE for the above three functions, followed by their FDEs */
 	.section .eh_frame,"a", at progbits
 .Lframe1:
         .long   .LEcie1-.LScie1
@@ -212,6 +234,15 @@ VG_(amd64_linux_REDIR_FOR_vtime):
         .uleb128 0x0
         .align 8
 .LEfde3:
+.LSfde4:
+        .long   .LEfde4-.LASfde4
+.LASfde4:
+        .long   .LASfde4-.Lframe1
+        .long   .LfnB4
+        .long   .LfnE4-.LfnB4
+        .uleb128 0x0
+        .align 8
+.LEfde4:
 	.previous
 
 .global VG_(trampoline_stuff_end)


Index: valgrind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/valgrind/devel/valgrind.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -p -r1.62 -r1.63
--- valgrind.spec	9 Mar 2009 12:50:44 -0000	1.62
+++ valgrind.spec	13 Jul 2009 11:30:48 -0000	1.63
@@ -1,11 +1,14 @@
 Summary: Tool for finding memory management bugs in programs
 Name: valgrind
 Version: 3.4.1
-Release: 1
+Release: 4
 Epoch: 1
 Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
 Patch1: valgrind-3.4.1-cachegrind-improvements.patch
 Patch2: valgrind-3.4.1-openat.patch
+Patch3: valgrind-3.4.1-x86_64-ldso-strlen.patch
+Patch4: valgrind-3.4.1-glibc-2.10.1.patch
+Patch5: valgrind-3.4.1-dwarf3.patch
 License: GPLv2
 URL: http://www.valgrind.org/
 Group: Development/Debuggers
@@ -15,7 +18,7 @@ Obsoletes: valgrind-callgrind
 # Ensure glibc{,-devel} is installed for both multilib arches
 BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
 %endif
-BuildRequires: glibc-devel >= 2.9
+BuildRequires: glibc-devel >= 2.10
 ExclusiveArch: %{ix86} x86_64 ppc ppc64
 %ifarch %{ix86}
 %define valarch x86
@@ -61,6 +64,9 @@ or valgrind plugins.
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %ifarch x86_64 ppc64
@@ -151,6 +157,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Mon Jul 13 2009 Jakub Jelinek <jakub at redhat.com> 3.4.1-4
+- handle version 3 .debug_frame, .eh_frame, .debug_info and
+  .debug_line (#509197)
+
+* Mon May 11 2009 Jakub Jelinek <jakub at redhat.com> 3.4.1-3
+- rebuilt against glibc 2.10.1
+
+* Wed Apr 22 2009 Jakub Jelinek <jakub at redhat.com> 3.4.1-2
+- redirect x86_64 ld.so strlen early (#495645)
+
 * Mon Mar  9 2009 Jakub Jelinek <jakub at redhat.com> 3.4.1-1
 - update to 3.4.1
 




More information about the fedora-extras-commits mailing list