[Phoenix-pm] Fwd: [perl #54044] perl -wle '%::=();//' crash

Scott Walters scott at slowass.net
Wed May 14 03:34:17 PDT 2008


Hi all,

Keeping up with my perversion of forwarding Perl crashers to the
list, here's the latest.

-scott

----- Forwarded message from Reini Urban <perlbug-followup at perl.org> -----

From: Reini Urban <perlbug-followup at perl.org>
Resent-To: perl5-porters at perl.org

# New Ticket Created by  Reini Urban 
# Please include the string:  [perl #54044]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=54044 >


perl -wle '%::=();//' crashes in all perl versions.

In regexec.c PL_replgv is empty after the whole symboltable is cleared 
and then used as GV.

regexec.c: SV* const oreplsv = GvSV(PL_replgv);
The gp pointer is 0x0, the type is BIND.

I would check for the empty gp pointer in PL_replgv and create an empty 
but valid stash.
The problem is the semantically an empty stash should be allowed in 
simple regex's. At least perl should not crash.

-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/

----- End forwarded message -----


More information about the Phoenix-pm mailing list