perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r357282 - in /perl/modperl/trunk/t: modperl/local_env.t response/TestModperl/local_env.pm
Date Sat, 17 Dec 2005 02:51:42 GMT
Author: gozer
Date: Fri Dec 16 18:51:38 2005
New Revision: 357282

URL: http://svn.apache.org/viewcvs?rev=357282&view=rev
Log:
Add a test case for the local %ENV segfaults fixed in r357236


Added:
    perl/modperl/trunk/t/modperl/local_env.t
    perl/modperl/trunk/t/response/TestModperl/local_env.pm

Added: perl/modperl/trunk/t/modperl/local_env.t
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/modperl/local_env.t?rev=357282&view=auto
==============================================================================
--- perl/modperl/trunk/t/modperl/local_env.t (added)
+++ perl/modperl/trunk/t/modperl/local_env.t Fri Dec 16 18:51:38 2005
@@ -0,0 +1,20 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest qw(GET);
+
+plan tests => 1;
+
+my $url = '/TestModperl__local_env';
+
+my $failed;
+foreach (1..25) {
+    my $req = GET $url;
+    unless ($req->is_success) {
+        $failed = 1;
+        last;
+    }
+}
+
+ok !$failed;

Added: perl/modperl/trunk/t/response/TestModperl/local_env.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestModperl/local_env.pm?rev=357282&view=auto
==============================================================================
--- perl/modperl/trunk/t/response/TestModperl/local_env.pm (added)
+++ perl/modperl/trunk/t/response/TestModperl/local_env.pm Fri Dec 16 18:51:38 2005
@@ -0,0 +1,19 @@
+package TestModperl::local_env;
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache2::Const -compile => 'OK';
+
+sub handler {
+    # This used to cause segfaults
+    # Report: http://thread.gmane.org/gmane.comp.apache.mod-perl/22236
+    # Fixed in: http://svn.apache.org/viewcvs.cgi?rev=357236&view=rev
+    local %ENV;
+
+    Apache2::Const::OK;
+}
+
+1;
+__END__
+SetHandler perl-script



Mime
View raw message