aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2004-06-30 07:24:41 +0800
committermbr <mbr@FreeBSD.org>2004-06-30 07:24:41 +0800
commitf1d25b21530e23fc5dfb79e33a57dec39dce8570 (patch)
treed45103acc24bca113b2a8cf6e46d44ef12a3aeb9 /mail
parentf85aa0dd413852a14c78e9a0d1cdb4094cfae91a (diff)
downloadfreebsd-ports-gnome-f1d25b21530e23fc5dfb79e33a57dec39dce8570.tar.gz
freebsd-ports-gnome-f1d25b21530e23fc5dfb79e33a57dec39dce8570.tar.zst
freebsd-ports-gnome-f1d25b21530e23fc5dfb79e33a57dec39dce8570.zip
Plug a big memleak in the mimedefang embedded perl mode. The fix seems
to be FreeBSD specific, other platforms (linux,solaris) have other problems (stability). The global variable "PL_perl_destruct_level" needs to be set to "1" before the destructor perl_destruct() is called, not afterwards. It is not clear why this has to be done, since "PL_perl_destruct_level" should be defined static. Without this fix "PL_perl_destruct_level" is always "0" when the destructor gets called. This fix has an effect only if "MX_EMBED_PERL=yes" is set in the startup- script which is needed to run mimedefang in the embedded perl mode. You should use perl 5.8.4 too to have it working properly. The fix has been committed to mimedefang 2.44-BETA-1. Reviewed by: David F. Skoll <dfs@roaringpenguin.com> Not reviewed by: Maintainer (no reply)
Diffstat (limited to 'mail')
-rw-r--r--mail/mimedefang/files/patch-embperl.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/mimedefang/files/patch-embperl.c b/mail/mimedefang/files/patch-embperl.c
new file mode 100644
index 000000000000..2812e2658357
--- /dev/null
+++ b/mail/mimedefang/files/patch-embperl.c
@@ -0,0 +1,20 @@
+--- embperl.c.orig Wed Jun 30 00:57:57 2004
++++ embperl.c Wed Jun 30 01:01:55 2004
+@@ -26,6 +26,9 @@
+ char *argv[6];
+ int argc;
+
++#ifdef SAFE_EMBED_PERL
++ PL_perl_destruct_level = 1;
++#endif
+ if (my_perl != NULL) {
+ #ifdef SAFE_EMBED_PERL
+ perl_destruct(my_perl);
+@@ -46,7 +49,6 @@
+ #ifdef PERL_SET_CONTEXT
+ PERL_SET_CONTEXT(my_perl);
+ #endif
+- PL_perl_destruct_level = 1;
+ perl_construct(my_perl);
+ if (subFilter) {
+ argv[0] = "";