Subject: | SEGF when $_ is aliased Readonly value. |
Hello maintainer.
I found apache will dump core file if $_ is aliased Readonly value.
Here is simple test program
-------- core.pl --------
#!/usr/bin/perl
use strict;
use warnings;
use YAML;
use Readonly;
Readonly my $r => 3;
YAML::Dump() foreach ($r);
print <<"END;";
Content-type: text/html
<html></html>
END;
--------
* Detail
"foreach ($r)" make "$_" alias Readonly value.
"YAML::Dump" call "requre" and "Exporter::import" is evaluated.
There is "local $_;" in "Exporter::import".
"local $_" cause untie $_. so "Readonly::Scalar::UNTIE" is called and die.
After that, httpd will get segf signal.
If you run this program at command line, It just die and no segf.
* Environment
linux fc8 2.6
apache2.2.9
perl5.8.8/perl5.10.1/perl5.12.1
mod_perl2.0.3/mod_perl2.0.4
Best regard.