ports/128866: Add patch from upstream to fix segfault in modperl on x86

Elvis Stansvik elvstone at gmail.com
Fri Nov 14 12:30:02 UTC 2008


>Number:         128866
>Category:       ports
>Synopsis:       Add patch from upstream to fix segfault in modperl on x86
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 14 12:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Elvis Stansvik
>Release:        7.0
>Organization:
>Environment:
FreeBSD franz.franzkafe.se 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #2: Tue May 20 20:31:14 CEST 2008     root at franz.franzkafe.se:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Add a patch from upstream that fixes a segfault on startup in the Perl module. The fix is in upstream SVN trunk and can be removed when the next ZNC is released [1].

Regards,
Elvis

[1] http://znc.svn.sourceforge.net/viewvc/znc?view=rev&revision=1237
>How-To-Repeat:
Run ZNC on i386 (and maybe other platforms) with the modperl module enabled. It will segfault in the OnLoad method in modperl.cpp.
>Fix:
See attached patch.

Patch attached with submission follows:

diff -ruN znc.bak/Makefile znc/Makefile
--- znc.bak/Makefile	2008-11-14 13:01:18.000000000 +0100
+++ znc/Makefile	2008-11-14 13:06:49.000000000 +0100
@@ -7,6 +7,7 @@
 
 PORTNAME=	znc
 PORTVERSION=	0.060
+PORTREVISION=	1
 CATEGORIES=	irc ipv6
 MASTER_SITES=	SF
 
diff -ruN znc.bak/files/patch-modules-modperl.cpp znc/files/patch-modules-modperl.cpp
--- znc.bak/files/patch-modules-modperl.cpp	1970-01-01 01:00:00.000000000 +0100
+++ znc/files/patch-modules-modperl.cpp	2008-11-14 13:06:03.000000000 +0100
@@ -0,0 +1,13 @@
+--- modules/modperl.cpp.orig	2008-11-14 13:02:05.000000000 +0100
++++ modules/modperl.cpp	2008-11-14 13:03:02.000000000 +0100
+@@ -984,8 +984,8 @@
+ bool CModPerl::OnLoad(const CString & sArgs, CString & sMessage)
+ {
+ 	int iArgc = 5;
+-	const char * pArgv[] = { "", "-e", "0", "-T", "-w", NULL };
+-	PERL_SYS_INIT3( &iArgc, (char ***)&pArgv, &environ );
++  char * pArgv[] = { "", "-e", "0", "-T", "-w", NULL };
++  PERL_SYS_INIT3( &iArgc, &pArgv, &environ );
+ 	m_pPerl = perl_alloc();
+ 	perl_construct(m_pPerl);
+ 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list