Author: pgollucci
Date: Fri Jun  5 05:57:17 2009
New Revision: 781917

URL: http://svn.apache.org/viewvc?rev=781917&view=rev
Log:
Address FreeBSD PR: ports/134749

This is actually a bug in gcc 4.2.1?x where
the array is optimized incorrectly causing
sefaults during startup.

Apparently the bug does not exist in FreeBSD 8
but is an issue in 7.x.

Reported by:    Troy <t...@twisted.net>
Submitted by:   Tim Zingelman <zingel...@fnal.gov>
Reviewed by:    myself


Modified:
    perl/modperl/branches/1.x/Changes
    perl/modperl/branches/1.x/src/modules/perl/mod_perl.c

Modified: perl/modperl/branches/1.x/Changes
URL: 
http://svn.apache.org/viewvc/perl/modperl/branches/1.x/Changes?rev=781917&r1=781916&r2=781917&view=diff
==============================================================================
--- perl/modperl/branches/1.x/Changes (original)
+++ perl/modperl/branches/1.x/Changes Fri Jun  5 05:57:17 2009
@@ -10,6 +10,10 @@
 
 =item 1.32-dev
 
+Work around a gcc optimization specific bug which
+cuased seg faults on FreeBSD 7.x during mod_perl startup.
+[Tim Zingelman <zingel...@fnal.gov>]
+
 =item 1.31 May 11, 2009
 
 Fix static APACI build on Mac OS X. [Gozer]

Modified: perl/modperl/branches/1.x/src/modules/perl/mod_perl.c
URL: 
http://svn.apache.org/viewvc/perl/modperl/branches/1.x/src/modules/perl/mod_perl.c?rev=781917&r1=781916&r2=781917&view=diff
==============================================================================
--- perl/modperl/branches/1.x/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/branches/1.x/src/modules/perl/mod_perl.c Fri Jun  5 05:57:17 
2009
@@ -596,6 +596,7 @@
 void perl_startup (server_rec *s, pool *p)
 {
     char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+    char **temp_argv=argv;
     char **entries, *dstr;
     int status, i, argc=1;
     dPSRV(s);
@@ -679,7 +680,7 @@
     MP_TRACE_g(fprintf(stderr, "..."));
 
 #ifdef PERL_SYS_INIT
-    PERL_SYS_INIT(&argc,(char***)&argv);
+    PERL_SYS_INIT(&argc,(char***)&temp_argv);
 #endif
 
 #ifndef perl_init_i18nl10n


Reply via email to