Bug#821194: [PATCH] avoid segfault on exit

Pino Toscano pino at debian.org
Sat Aug 13 10:33:30 UTC 2016


retitle 821194 libwx-perl: dobule free at exit because of envvars handling
severity 821194  important
tag 821194 + patch
thanks

Hi,

the issue here is Perl crashing when closing down, in particular it
happens in perl/perl.c:perl_destruct, down in the cleanup of the custom
environment: apparently the perl interpreter was not the only one to set
environment variables.  Indeed, looking down the road, wxApp::Initialize
in wxWidgets calls its own wxSetEnv (which uses setenv).
A similar issue was reported for the Inline::Python module [1][2], and
fixed [3] by setting PL_use_safe_putenv=1: Wx::Perl actually sets it,
but only with DEBUGGING defined as well (which IIRC is set only when Perl
is built in debugging mode).

While the crash seems to happen on Hurd only, running the tests under
valgrind in a current sid chroot shows that valgrind reports double
free cases. Hence, I'm attaching the following patch to just remove the
check on DEBUGGING, and use PL_use_safe_putenv as it should
(the !PERL_USE_SAFE_PUTENV check needs to stay for builds of Perl with
"safe putenv").

Can you please apply it for Debian, and forward it upstream?

[1] https://github.com/niner/inline-python-pm/issues/7
[2] https://github.com/niner/inline-python-pm/issues/9
[3] https://github.com/niner/inline-python-pm/commit/35db0d3109880b9104c0a9d2562520997825de0c

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-debugging-check.diff
Type: text/x-patch
Size: 370 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160813/30e72e4c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160813/30e72e4c/attachment.sig>


More information about the pkg-perl-maintainers mailing list