# New Ticket Created by  Jürgen Bömmels 
# Please include the string:  [perl #23063]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23063 >


Hello,

for searching memory leaks it to run the testsuite with valgrind. The
attached patch allows to run
make test VALGRIND='valgrind -q'
and find the memory bugs.

Here is a summary of errors i found this way (investigating the
details now)

Failed Test     Status Wstat Total Fail  Failed  List of Failed
--------------------------------------------------------------------------------
t/op/gc.t          6  1536     8    6  75.00%  1, 3-7
t/op/stacks.t      3   768    56    3   5.36%  6, 12, 52
t/op/string.t      1   256   107    1   0.93%  97
t/pmc/eval.t       3   768     3    3 100.00%  1-3
t/pmc/intlist.t    3   768     9    3  33.33%  3-4, 6
t/pmc/io.t         2   512    17    2  11.76%  2, 6
t/pmc/sub.t        1   256    52    1   1.92%  46

But be careful this takes a huge amount of memory and the test is even
slower than in the old days of assemble.pl

bye
boe



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/61520/45344/08a02b/valgrind.diff

Index: lib/Parrot/Test.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Test.pm,v
retrieving revision 1.41
diff -u -r1.41 Test.pm
--- lib/Parrot/Test.pm	2 Jul 2003 13:48:56 -0000	1.41
+++ lib/Parrot/Test.pm	19 Jul 2003 11:21:43 -0000
@@ -54,6 +54,10 @@
   open  STDOUT, ">$out"    or die "Can't redirect stdout" if $out;
   open  STDERR, ">$err"    or die "Can't redirect stderr" if $err;
 
+  if (defined $ENV{VALGRIND}) {
+    $command = "$ENV{VALGRIND} $command";
+  }
+
   system $command;
   my $exit_code = $? >> 8;
 

Reply via email to