develooper Front page | perl.perl5.porters | Postings from June 2013

Re: reducing perl-crashing scripts to a minimum reproducer

Thread Previous
Ed Avis
June 25, 2013 12:13
Re: reducing perl-crashing scripts to a minimum reproducer
Message ID:
Greg Lindahl <greg <at>> writes:

>Inspired by C-Reduce, perl-reduce takes a perl program that causes a
>bug in perl itself, such as a core-dump in the perl interpreter, and
>tries to reduce the program to the minimum program needed to cause the

This looks very handy.  Until now I have used 'delta' for this job, but that
is a simple text-based tool that just removes whole lines.  Next time I will
try your tool instead.

A feature I've sometimes wished for is to automatically inline libraries,
replacing 'use Foo' with the contents of followed by 'package main;'.
Once you have a minimal test case, but it contains a 'use' line, you can
expand out that library and minimize again.

Sometimes, too, I will inline file contents as DATA sections.  They can then
be minimized line-by-line.  So as well as B::Deparse it might be useful to
try knocking out lines from DATA sections or here documents.

Ed Avis <>

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About