Hi,
sorry for the VERY late reply... yes, the suggested fix basically
solves the issue. For me it is not entirely solved, but that is
another story: Solaris changed the handling of the environment
significantly between Solaris 8 and Solaris 10; and when you
want to have a Perl binary that runs equally on Solaris 8 and
10, then there's no other choice than using putenv(), which
leaks memory. Only a native compile on Solaris 10, using the
new setenv() and unsetenv() functions (not available in
Solaris 8) will cure the issue once and for all...
Many thanks for your help anyway!
Cheers,
Marek
Show quoted text-----Original Message-----
From: banb@yahoo.co.jp via RT [mailto:bug-CGI-SpeedyCGI@rt.cpan.org]
Sent: Thursday, December 14, 2006 3:09 AM
To: MAREKR@cpan.org
Subject: [rt.cpan.org #13521] Memory leak with Perl >5.8.5
<URL:
http://rt.cpan.org/Ticket/Display.html?id=13521 >
Since Perl 5.8.6, my_setenv() 's behavior in embed-perl changed as if
the system has non-leaking putenv() function. So on some architectures,
persistent embed perl interpreter produces memory leak.
From perl586delta (Also see perl-5.8.*/INSTALL file)
> Changed Internals
>
> From now on all applications embedding perl will behave
> as if perl were compiled with -DPERL_USE_SAFE_PUTENV.
> See "Environment access" in the INSTALL file for details.
To work against that leak, set 'PL_use_safe_putenv = 0;' after
perl_construct() call.
Attached patch might work.
-- banb
MAREKR wrote:
> With Perl 5.8.6 and 5.8.7 I see a memory leak in the test of CGI-
> SpeedyCGI (see also the posting I did on perl5-porters,
>
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2005-
> 02/msg00006.html ):
>
> t/be_memleak..........1..2
> ok
> mem usage went from 3672K to 10328K in 1000 runs
> not ok
> FAILED test 2
> Failed 1/2 tests, 50.00% okay