Segfault in 5.10.1

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Have not seen segfaults in "recent" Perls for quite a long time (at
least not in scripts which were working for decades ;-).

 powdermilk:/tmp->perl -wle 'local *kid = q(abc); $kid[0]  =~ /[9k]/'
 Segmentation fault
 Exit 139

Is it fixed in newer Perls?


Re: Segfault in 5.10.1

Quoted text here. Click to load it

$ perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for i386-netbsd

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this
system using "man perl" or "perldoc perl".  If you have access to the Internet,
point your browser at /, the Perl Home Page.

$ perl -wle 'local *kid = q(abc); $kid[0]  =~ /[9k]/'

Use of uninitialized value $kid[0] in pattern match (m//) at -e line 1.

Re: Segfault in 5.10.1

Quoted text here. Click to load it

The bug is present in all 5.10s and 5.12s, and fixed in 5.14.0.

git bisect says it was fixed by
, which went into 5.13.11. See also

(The bug *doesn't* appear to be present in any 5.8s, despite
pp_aelemfast containing the same code as in 5.10. Presumably something
else changed in 5.10 that made that code incorrect, and noone realised
and fixed it.)


Site Timeline