Philippe M. Chiasson wrote:
Got to the bottom of this one, and it turns out it's a bug in Perl-5.6.1 w/o 
threads

perl_destruct(perl);
perl_free(perl);

Doesn't cleanup sufficiently and a subsequent perl_parse() will segfault

Turns out this has been eventually fixed in Perl 5.8.2. There were plenty of Perl internal gloabls that were not cleaned up proprely by perl_destruct(). I've spent some time trying to backport the cleanup fix introduced in 5.8.2 and came up with this incomplete lists of things to cleanup:

PL_dbargs = Nullav;
PL_DBcv = Nullcv;
PL_DBgv = Nullgv;
PL_DBline = Nullgv;
PL_DBsignal = Nullsv;
PL_DBsingle = Nullsv;
PL_DBsub = Nullgv;
PL_DBtrace = Nullsv;
PL_debug = 0;
PL_defstash = 0;
PL_he_root = 0;
PL_hints = 0;
PL_origfilename = Nullch;
PL_perldb = 0;
PL_perldb = 0;
PL_reg_start_tmp = (char**)NULL;
PL_reg_start_tmpl = 0;
PL_sv_count = 0;
PL_sv_objcount = 0;
PL_tainting = FALSE;
PL_xiv_root = 0;
PL_xnv_root = 0;
PL_xpvav_root = 0;
PL_xpvbm_root = 0;
PL_xpvcv_root = 0;
PL_xpvhv_root = 0;
PL_xpvhv_root = 0;
PL_xpviv_root = 0;
PL_xpvlv_root = 0;
PL_xpvmg_root = 0;
PL_xpvnv_root = 0;
PL_xpv_root = 0;
PL_xpv_root = 0;
PL_xrv_root = 0;

With all these, my test pbug.c does pass successfully on 5.6.1 w/o threads but
mod_perl still segfaults with it. Must be still missing improprely cleanedup
items.

So, unless anybody feels especially curious and finds the missing entries, I
think it's reasonable to require perl-5.8.2+ for static prefork builds.

Thoughts?
--------------------------------------------------------------------------------
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

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to