On May 16, 2007, at 5:58 AM, Xavier Noria wrote:

Fortunately the tester that reported the problem (David Cantrell) is so kind as to provide a SSH account on his Linux.

He's done that for me, too.  Good bloke.

Indeed, if I run the test under Valgrind in 5.6.2 there's a

==15955== Invalid write of size 4
==15955== at 0x4A0829D: __next_partition_of_size_p (in /home/ perluser/FXN/Algorithm-Combinatorics-0.22/blib/arch/auto/Algorithm/ Combinatorics/Combinatorics.so)

But in 5.8.8 it completes the test, the only errors come at the beginning and seem to be unrelated to the module (reported about Perl_runops_standard). There were some under 5.6.2 like those as well, but much less.

Errors? I've seen leaks (including one in DynaLoader), but I don't recall errors under 5.8.8.

I have a perl 5.8.8 compiled with -DDEBUGGING that I use for valgrind testing, and I feed it this suppressions file:

  http://xrl.us/wdve (Link to www.rectangular.com)

The full command is:

  valgrind --leak-check=full --show-reachable=yes \
  --suppressions=../devel/p588_valgrind.supp \
  /usr/local/debugperl/bin/perl5.8.8 -Mblib \
  t/test_file.t

More on these leaks in this thread.

  http://www.nntp.perl.org/group/perl.xs/2007/01/msg2358.html
  http://www.nntp.perl.org/group/perl.xs/2007/01/msg2357.html

Diffing the Combinatorics.c generated by each perl the only differences seem to be calls to PERL_UNUSED_VAR() in 5.6.2

#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

that are not generated by 5.8.8. Looks harmless, hmmmmmmm.

Yeah, that's just to avoid compiler warnings about unused variables.

You probably have the tools to track this down now. Throw in some debug prints until you figure out exactly where in your test code the error occurs. Keep reducing the test code... yada, yada, standard bug isolation.

With Valgrind, debugging C becomes a lot more like debugging Perl.  :)

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


Reply via email to