Improving Perl 5: Report for Month 2

Nicholas Clark writes:

As per my grant conditions, here is a report for the October period.

automating git bisect:

I continued the work I started at the end of September to automate the use of git bisect. My hope is that it's now easy enough for anyone (and everyone) who finds a core perl behaviour change that affects them (bug, or a bug fix), to use it to find the commit that caused it and the associated change description, all without needing to ask anyone else. My broader goal is to increase involvement with the perl core by making it easier for people to start playing with it.

Hopefully for most cases, its use is as simple as changing something like

perl -e 'my $a := 2;'


.../Porting/ -e 'my $a := 2;'

to discover the commit which makes the code example die. (This example now dies at compile time. Code examples that die at runtime work exactly the same way.)

It can build perl between 5.002 and blead on Linux, FreeBSD, NetBSD, OpenBSD, OS X and Solaris on (at least) x86_86, x86, sparc, sparc64, mips and mips64 [not tested on all platforms on all architectures - I only have access to x86 Solaris]. I've improved the usability, and refactored the code to increase its maintainability. As of early November (technically outside the scope of this report) I belive that it's pretty much finished.


A supposedly routine test of the bisect runner on OpenBSD/sparc revealed that it can't build perl-5.8.0 from source, crashing with a SEGV soon after building miniperl. The test case reduced to ./miniperl -e '/(.*)?/' and rather than a quick obvious fix, the bisect to find the cause revealed a commit which changed the size of constants used to determining buffer sizes for UTF-8 processing.

This smelled like a security bug, particularly when a minor refactoring of code in regexec.c could cause the stash smashing detection code to trigger an abort. After a lot of confusing investigation, including getting the bisect runner to build on sparc64 Linux for comparison, it turns out that the problem is a bug in the gcc shipped on OpenBSD 4.6.

I was on holiday in Croatia for a week, and attending the German Perl Workshop in Frankfurt took up a lot of the following week, hence the lower hours than September.

A more detailed breakdown summarised from the weekly reports. In these:

16 hex digits refer to commits in
RT #... is a bug in
CPAN #... is a bug in
BBC is "bleadperl breaks CPAN" - Andreas König's test reports for CPAN modules

0.75*printf format for HEKs
0.50++$i, LVALUEs, and the general case
0.25AIX smoke failure
Porting/ (FreeBSD)
Porting/ (Generalising -L/usr/local/lib)
Porting/ (OpenBSD sparc)
Porting/ (Usability tweaks)
Porting/ (backport -A)
Porting/ (refactoring for maintainability)
Porting/ (sparc64 Linux)
0.50Porting/, t/porting/authors.t
2.25Solaris -xO3 failure
13.25Sparc SIGBUS
Sparc SIGBUS (symbol scanning)
3.50reading/responding to list mail
4.25relocatable @INC
0.50version->new("version") [RT #102586]

92.00 hours in total

I calculate that this is now 234.25 hours in total, with 165.75 hours remaining.

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at

About this Entry

This page contains a single entry by Karen Pauley published on November 3, 2011 1:38 PM.

Fixing Perl5 Core Bugs: Report for Month 20 was the previous entry in this blog.

Hague Grant Accepted: Implementation of Macros in Rakudo is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.


OpenID accepted here Learn more about OpenID
Powered by Movable Type 6.2.2