Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section

[prev] [thread] [next] [Date index for 2005/03/10]

From: Philippe M. Chiasson
Subject: Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section
Date: 22:21 on 10 Mar 2005
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig00FDEC78F3E2D8F24797F7C9
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Dominique Quatravaux wrote:
> Philippe M. Chiasson a écrit :
> 
> | I've identified the source of the problem I believe, so can you try
> |  this patch and let me know if it works for you?
> 
> Works! BTW, your patch was defective but Emacs' diff-mode fixed that
> in no time. Therefore I'm re-attaching it for the record.

As is, it was leaking a SV. A better patch is now on the trunk@156999

> Index: src/modules/perl/modperl_cmd.c
> ===================================================================
> --- src/modules/perl/modperl_cmd.c      (revision 156679)
> +++ src/modules/perl/modperl_cmd.c      (working copy)
> @@ -554,8 +554,8 @@
> ~         ENTER;SAVETMPS;
> ~         save_scalar(gv); /* local $0 */
> ~         sv_setpv_mg(GvSV(gv), directive->filename);
> -        eval_pv(arg, FALSE);
> +        eval_sv(newSVpv(arg, 0), G_KEEPERR);
> ~         modperl_env_sync_srv_env_hash2table(aTHX_ p, scfg);
> ~         modperl_env_sync_dir_env_hash2table(aTHX_ p, dcfg);
> ~         FREETMPS;LEAVE;
> ~     }
> 

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

--------------enig00FDEC78F3E2D8F24797F7C9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCMMh6yzKhB4jDpaURAn0xAKCK6QFBFsLTqiauWjYD0lZroLPIFACeLI//
eTRSjJBzClgbYaeJ/VbbwKk=
=8CCg
-----END PGP SIGNATURE-----

--------------enig00FDEC78F3E2D8F24797F7C9--

Re: [BUG MP1/MP2] Apache should bail out in case of syntax errors in <Perl> section
Philippe M. Chiasson 22:21 on 10 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52