dougm 01/11/01 18:59:32 Modified: src/modules/perl modperl_perl.c Log: prevent perl from free-ing the environ array multiple times (segv) Revision Changes Path 1.8 +9 -0 modperl-2.0/src/modules/perl/modperl_perl.c Index: modperl_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- modperl_perl.c 2001/11/01 23:50:32 1.7 +++ modperl_perl.c 2001/11/02 02:59:32 1.8 @@ -91,6 +91,15 @@ PL_perl_destruct_level = 2; +#ifdef USE_ENVIRON_ARRAY + /* XXX: otherwise Perl may try to free() environ multiple times + * but it wasn't Perl that modified environ + * at least, not if modperl is doing things right + * this is a bug in Perl. + */ + PL_origenviron = environ; +#endif + perl_destruct(perl); /* XXX: big bug in 5.6.1 fixed in 5.7.2+