[lfs-patches] r3517 - trunk/curl

renodr at higgs.linuxfromscratch.org renodr at higgs.linuxfromscratch.org
Tue Feb 28 01:31:05 PST 2017


Author: renodr
Date: Tue Feb 28 01:31:05 2017
New Revision: 3517

Log:
Bump curl patch

Added:
   trunk/curl/curl-7.53.1-valgrind_filter-1.patch
      - copied unchanged from r3516, trunk/curl/curl-7.52.1-valgrind_filter-1.patch

Copied: trunk/curl/curl-7.53.1-valgrind_filter-1.patch (from r3516, trunk/curl/curl-7.52.1-valgrind_filter-1.patch)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/curl/curl-7.53.1-valgrind_filter-1.patch	Tue Feb 28 01:31:05 2017	(r3517, copy of r3516, trunk/curl/curl-7.52.1-valgrind_filter-1.patch)
@@ -0,0 +1,111 @@
+Submitted by:            Douglas R. Reno
+Date:                    2016-12-23
+Initial Package Version: 7.52.1
+Origin:                  Douglas R. Reno
+Upstream Status:         Rejected
+Description: Restores the valgrind.pm file to fix the test suite.
+
+diff -Naurp curl-7.52.1.orig/tests/valgrind.pm curl-7.52.1/tests/valgrind.pm
+--- curl-7.52.1.orig/tests/valgrind.pm	2016-12-22 01:48:20.000000000 -0600
++++ curl-7.52.1/tests/valgrind.pm	2016-12-23 08:31:11.815781610 -0600
+@@ -5,7 +5,7 @@
+ #                            | (__| |_| |  _ <| |___
+ #                             \___|\___/|_| \_\_____|
+ #
+-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel at haxx.se>, et al.
++# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel at haxx.se>, et al.
+ #
+ # This software is licensed as described in the file COPYING, which
+ # you should have received as part of this distribution. The terms
+@@ -26,9 +26,90 @@ sub valgrindparse {
+     my ($srcdir,     # the dir in which the runtests script resides
+         $sslenabled,
+         $file) = @_;
++    my $leak;
++    my $invalidread;
++    my $uninitedvar;
++    my $error;
++    my $partial;
++    my $us;
++
+     my @o;
++
++    my $bt=0;
++    my $nssinit=0;
++
+     open(VAL, "<$file");
+-    @o = <VAL>;
++    while(<VAL>) {
++        if($bt) {
++            # back trace parsing
++            if($_ =~ /^==(\d+)== *(at|by) 0x([0-9A-F]+): (.*)/) {
++                my $w = $4;
++                if($w =~ /(.*) \(([^:]*):(\d+)/) {
++                    my ($func, $source, $line)=($1, $2, $3);
++                    my $sourcename = basename($source);
++                    if(-f "$srcdir/../src/$sourcename" ||
++                       -f "$srcdir/../lib/$sourcename") {
++                        # this is our source
++ #                       print "$func() at $source:$line\n";
++                        $us++;
++                    } #else {print "Not our source: $func, $source, $line\n";}
++                }
++
++                # the memory leakage within NSS_InitContext is not a bug of curl
++                if($w =~ /NSS_InitContext/) {
++                    $nssinit++;
++                }
++            }
++            else {
++                if($us and not $nssinit) {
++                    # the stack trace included source details about us
++
++                    $error++;
++                    if($leak) {
++                        push @o, "\n Leaked $leak bytes\n";
++                    }
++                    if($invalidread) {
++                        push @o, "\n Read $invalidread invalid bytes\n";
++                    }
++                    if($uninitedvar) {
++                        push @o, "\n Conditional jump or move depends on uninitialised value(s)\n";
++                    }
++                }
++                $bt = 0; # no more backtrace
++                $us = 0;
++                $nssinit = 0;
++            }
++        }
++        else {
++            if($_ =~ /(\d+) bytes in (\d+) blocks are definitely lost/) {
++                $leak = $1;
++                if($leak) {
++                    $error++;
++                }
++                $bt = 1;
++            }
++            elsif($_ =~ /Invalid read of size (\d+)/) {
++                $invalidread = $1;
++                $error++;
++                $bt = 1;
++            }
++            elsif($_ =~ /Conditional jump or move/) {
++                # If we require SSL, this test case most probaly makes
++                # us use OpenSSL. OpenSSL produces numerous valgrind
++                # errors of this kind, rendering it impossible for us to
++                # detect (valid) reports on actual curl or libcurl code.
++
++                if(!$sslenabled) {
++                    $uninitedvar = 1;
++                    $error++;
++                    $bt = 1;
++                }
++                else {
++                    $partial=1;
++                }
++            }
++        }
++    }
+     close(VAL);
+     return @o;
+ }


More information about the patches mailing list