On 2009-7月-29 水 09:09:47, DAXIM wrote:
Show quoted text> On my perl, compiling with -DPERL_USE_SAFE_PUTENV does not help. This
> is Perl 5.10, T::R::G 1.19 and readline 6.0. Troubleshooting
> information as requested in INSTALL file is attached.
Your report says;
-------------------------------------------------
==29242== Invalid read of size 8
==29242== at 0x4639D6: Perl_safesysfree (util.c:230)
==29242== by 0x47E5D4: perl_destruct (perl.c:836)
==29242== by 0x422706: main (perlmain.c:115)
==29242== Address 0x6a28408 is not stack'd, malloc'd or (recently) free'd
panic: free from wrong pool during global destruction.
==29242==
==29242== ERROR SUMMARY: 1 errors from 1 contexts suppressed: 8 from 2)
...
Show quoted text> perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
-------------------------------------------------
This shows that perl_safesysfree at perl.c:836 caused an error.
The follow is the part of perl.c of perl-5.10.0.
-------------------------------------------------
824 #ifndef PERL_MICRO
825 #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV)
826 if (environ != PL_origenviron && !PL_use_safe_putenv
827 #ifdef USE_ITHREADS
828 /* only main thread can free environ[0] contents */
829 && PL_curinterp == aTHX
830 #endif
831 )
832 {
833 I32 i;
834
835 for (i = 0; environ[i]; i++)
836 safesysfree(environ[i]);
837
838 /* Must use safesysfree() when working with environ. */
839 safesysfree(environ);
840
841 environ = PL_origenviron;
842 }
843 #endif
844 #endif /* !PERL_MICRO */
-------------------------------------------------
The line 836 should not exist if PERL_USE_SAFE_PUTENV is defined.
This means your perl.o was compiled without PERL_USE_SAFE_PUTENV defined.
Use perl compile with -DPERL_USE_SAFE_PUTENV should be an fix for this
issue.