I've been playing with valgrind for a while, and it never worked with httpd 2.0 ;-( Well, the latest version of valgrind, 1.0.4 finally fixes it !
I was able to run mod_perl 2.0 under valgrind for the first time ;-)
So, being lazy, I patched Apache-Test.
Gozer out.
Index: Apache-Test/lib/Apache/TestServer.pm
===================================================================
RCS file:
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.60
diff -u -I'$Id' -I'$Revision' -r1.60 TestServer.pm
--- Apache-Test/lib/Apache/TestServer.pm 1 Jul 2002 08:11:50 -0000 1.60
+++ Apache-Test/lib/Apache/TestServer.pm 20 Jan 2003 09:55:17 -0000
@@ -20,6 +20,7 @@
my %debuggers = (
gdb => 'gdb',
ddd => 'gdb',
+ valgrind => 'valgrind',
strace => 'strace',
);
@@ -124,6 +125,28 @@
my($self, $strace, $file) = @_;
#XXX truss, ktrace, etc.
"$strace -f -o $file -s1024";
+}
+
+sub valgrind_cmd {
+ my($self, $valgrind) = @_;
+ "$valgrind -v --leak-check=yes --show-reachable=yes";
+}
+
+sub start_valgrind {
+ my $self = shift;
+ my $opts = shift;
+
+
+ my $config = $self->{config};
+ my $args = $self->args;
+ my $one_process = $self->version_of(\%one_process);
+ my $valgrind_cmd = $self->valgrind_cmd($opts->{debugger});
+ my $httpd = $config->{vars}->{httpd};
+
+ my $command = "$valgrind_cmd $httpd $one_process $args";
+
+ debug $command;
+ system $command;
}
sub start_strace {
signature.asc
Description: This is a digitally signed message part
