develooper Front page | perl.perl5.porters | Postings from May 2008

perl -wle '%::=();//' crash

Thread Next
From:
Reini Urban
Date:
May 12, 2008 10:58
Subject:
perl -wle '%::=();//' crash
Message ID:
48288523.3090403@x-ray.at
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/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About