Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2009 11:11:38 +0200
From:      Cezary Morga <cm@therek.net>
To:        Ion-Mihai Tetcu <itetcu@FreeBSD.org>, skv@FreeBSD.org, freebsd-perl@FreeBSD.org
Subject:   PERL_USE_SAFE_PUTENV (Re: [Custom PREFIX] x11-toolkits/p5-Wx-Perl-ProcessStream - fails:     coredump)
Message-ID:  <4A4490CA.3050401@therek.net>
In-Reply-To: <20090609232300.631a159b@it.buh.tecnik93.com>
References:  <20090607085240.233A48FCB7@release.ixsystems.com>	<4A2C23DD.3070108@therek.net>	<20090608003510.0ae0f5d3@it.buh.tecnik93.com>	<4A2EAFD1.10903@therek.net> <20090609232300.631a159b@it.buh.tecnik93.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi.

Although this is a follow-up to my and Ion-Mihai Tetcu's corespondence, 
freebsd-perl@ folks, please bear with me till the end.

Ion-Mihai, I've finally managed to locate the source of 
p5-Wx-Perl-ProcessStream's core dumping (at least on 8-CURRENT).

It comes from p5-Wx memory leaks problems on which 
p5-Wx-Perl-ProcessStream depends on, which in turn comes from Perl 
trying to directly manipulate environment (see Envinronment access 
section: 
http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Environment_access).

I'm currently testing a small patch for p5-Wx to try forcing the use of 
FreeBSD's putenv() and if it'll work then p5-Wx-Perl-ProcessStream issue 
should be resolved.

But I think forcing Perl itself to use putenv() (-DPERL_USE_SAFE_PUTENV 
compilation flag) might be a solution worth at least a though. It would 
not only solve my problem but I believe other (like ports/131664) too.

And here comes a question to skv@ and free-ports@: what do you think 
about it?

In attachment I'm sending a patch for lang/perl5.10/Makefile but I think 
this should work for perl5.8 as well.
-- 
Cezary Morga

[-- Attachment #2 --]
--- lang/perl5.10/Makefile.orig	2009-04-11 14:51:22.000000000 +0200
+++ lang/perl5.10/Makefile	2009-06-26 11:06:10.000000000 +0200
@@ -52,7 +52,8 @@
 	-Dsiteman1dir=${PREFIX}/man/man1 \
 	-Ui_malloc -Ui_iconv -Uinstallusrbinperl \
 	-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none \
-	-Dccflags=-DAPPLLIB_EXP=\"${BSDPAN_DEST}\"
+	-Dccflags=-DAPPLLIB_EXP=\"${BSDPAN_DEST}\" \
+	-DPERL_USE_SAFE_PUTENV -A append:ccflags=" -DPERL_USE_SAFE_PUTENV"
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A4490CA.3050401>