Improving Perl 5: Report for Month 1

1 Comment

Nicholas Clark writes:

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

Highlights are:

POSIX:
POSIX::Termios and POSIX::SigSet no longer crash with ithreads
The XS code has been refactored to reduce the size of the shared object by about 12%, with no change in functionality. More POSIX functions now have tests.

Storable:
Should now pass tests with older version of Test::More
Should now build all the way back to 5.004. [That was easy]
Stripped the XS of code that duplicates ppport.h
Shrunk the shared object slightly

ExtUtils::ParseXS:
xsubpp now generates 4 fewer lines of C code per XS function.

relocatable @INC:
I've spend a chunk of the time working on relocatable @INC, prompted by Johann 'Myrkraverk' Oskarsson's patch for Solaris. As ever, it revealed other things that need looking at. Probing for is now in blead. This generated two BBC reports, one of which was "interesting" to diagnose. Blead now converts $^X to an absolute path on FreeBSD (using sysctl() instead of /proc), OS X (using _NSGetExecutablePath()) and Solaris 10 and 11 (using an adaptation of his patch for /proc)

As these need more probes in Configure, I discovered that keeping Porting/chkcfgvar.pl happy is more work that it could be, so set about automating as much of that as possible. It can now generate default entries in all the config.sh style files. It can also now generate TAP output, and is run as part of the regression tests, to ensure that the config.sh-style files don't get out of date.

automating git bisect:
As a side effect of various bits of frustration with git bisect, I've written Porting/bisect.pl, which is intended to make it unbeatably easy to bisect problems.

eg, these just work as is:

# When did this become an error?
.../Porting/bisect.pl -e 'my $a := 2;'
# When did this stop being an error?
.../Porting/bisect.pl --expect-fail -e '1 // 2'
# When did this stop matching?
.../Porting/bisect.pl --match '\b(?:PL_)hash_seed_set\b'
# When did this start matching?
.../Porting/bisect.pl --expect-fail --match '\buseithreads\b'
# When did this test program stop working?
.../Porting/bisect.pl --target=perl -- ./perl -Ilib test_prog.pl
# When did this first become valid syntax?
.../Porting/bisect.pl --target=miniperl --end=v5.10.0 \
--expect-fail -e 'my $a := 2;'
# What was the last revision to build with these options?
.../Porting/bisect.pl --test-build -Dd_dosuid

At the end of September it was working on x86_64 Linux, capable of building any perl between perl-5.004 and blead.

Since then (and technically outside the scope of this report) I've improved it. It can now build miniperl back to perl-5.000, and perl (and extensions) back to perl-5.001n on x86_64 Linux and FreeBSD. (On the systems I have tested. In addition to the
contributors to the CMF who fund this grant, I'd like to thank Les Mongueurs de Perl for continuing to providing me access to a fast multicore FreeBSD machine. I can only test these sort of things on systems I have access to.)

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

16 hex digits refer to commits in http://perl5.git.perl.org/perl.git
RT #... is a bug in https://rt.perl.org/rt3/
CPAN #... is a bug in https://rt.cpan.org/Public/
BBC is "bleadperl breaks CPAN" - Andreas König's test reports for CPAN modules

[Hours][Activity]
0.50:utf8 options
0.75Cwd
1.00ExtUtils::ParseXS dVAR [98e6112272363eb6]
0.25Glob [924d3af1d7b5591e]
0.25Investigating dVAR
4.00Jesse's plan
1.25ODBM_File
ODBM_File, Data::Dumper
27.25POSIX
POSIX (because Win32 ain't POSIX enough)
POSIX (documenting improvements)
POSIX Solaris (yay!)
POSIX Win32
POSIX and its subtleties
POSIX, pp_chdir failure
POSIX::Termios
POSIX::Termios, ithreads, PTROBJ
1.00Patches for CPAN modules assuming too much about POSIX.xs
11.50Porting/bisect.pl
9.75Porting/checkcfgvar.pl
Porting/checkcfgvar.pl (refactor and add it as a test)
1.75RT #98662: enhance HARNESS_TIMER functionality
3.00RT #99850
2.75Storable
1.00Test for RT #75722, RT #96008
0.50XSLoader
0.50a proposal for $[
1.25chdir|chmod|chown passed a reference to tied globs.
2.00de-duplicate includes [75006f0f4402bbab]
5.50investigating the BBC reports for stdbool
1.50ithreads, PTROBJ interaction
5.25podchecker
podchecker and .PL files
podchecker is slow [CPAN #71139]
0.50prune dVAR and dNOOP
31.50reading/responding to list mail
reading/responding to list mail (inc #98662 and //)
reading/responding to list mail [including base.pm]
0.50regen.t (simplify code by using TestInit)
24.25relocatable inc
relocatable inc [and related collateral]
1.00stdbool
1.00strxfrm() gets absurd [e0601d3cce250689 etc]
0.50t/op/pwent.t
t/op/pwent.t [876725cf9533c025]
2.50trying to nail podchecker

144.25 hours in total

1 Comment

Wow! Great work!

Leave a comment

About TPF

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

Recent Comments

About this Entry

This page contains a single entry by Karen published on October 17, 2011 4:05 AM.

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

Fixing Perl5 Core Bugs Grant Extended 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 4.38