ports/143981: ZSH_MEM, ZSH_SECURE_FREE, DEBUG

Richard Kolkovich sarumont at sigil.org
Tue Feb 16 05:50:02 UTC 2010


>Number:         143981
>Category:       ports
>Synopsis:       ZSH_MEM, ZSH_SECURE_FREE, DEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 16 05:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Richard Kolkovich
>Release:        8.0-STABLE
>Organization:
sigil.org
>Environment:
FreeBSD magus 8.0-STABLE FreeBSD 8.0-STABLE #1: Mon Feb 15 18:10:24 CST 2010     root at magus:/usr/obj/usr/source/RELENG_8/sys/MAGUS  amd64
>Description:
zsh 'exit' takes approximately 10s with 30k history items, SAVEHIST/HISTSIZE both at 100000 on my amd64 build.  An i386 jail is faster using the same history file, but it is still not "instant".  Diagnosed the problem to be the zsh memory (de)allocation routines.  Compiling without --enable-zsh-mem results in my zsh exiting "instantly"

The attached patch separates the zsh-mem and zsh-secure-free options in the port, defaulting zsh-mem to off.
>How-To-Repeat:
Install zsh with default options on an amd64 build and try to exit zsh with 30k+ items in ~/.histfile
>Fix:
Don't compile with --enable-zsh-mem

Patch attached with submission follows:

--- Makefile.orig	2010-01-22 08:29:35.000000000 -0600
+++ Makefile	2010-02-15 23:40:02.000000000 -0600
@@ -40,11 +40,13 @@
 EXTRA_COMPLETION_DIR=	Completion/BSD/Command
 
 OPTIONS=	ZSH_GDBM	"Enable GDBM support (GPL)" off \
-		ZSH_MEM		"Enable zsh-mem and zsh-secure-free options" on \
+		ZSH_MEM		"Enable zsh-mem" off \
+		ZSH_SECURE_FREE "Enable zsh-secure-free option" on \
 		ZSH_MAILDIR	"Enable support for Maildirs in MAIL(PATH)" on \
 		ZSH_MULTIBYTE	"Enable multibyte character support" on \
 		ZSH_PCRE	"Enable PCRE support" off \
-		ZSH_STATIC	"Build static executable" off
+		ZSH_STATIC	"Build static executable" off \
+		DEBUG	"Compile with debugging symbols" off
 
 PLIST_SUB+=	ZSH_VER="${ZSH_VER}"
 
@@ -78,7 +80,11 @@
 .endif
 
 .if defined(WITH_ZSH_MEM)
-CONFIGURE_ARGS+=	--enable-zsh-mem --enable-zsh-secure-free
+CONFIGURE_ARGS+=	--enable-zsh-mem 
+.endif
+
+.if defined(WITH_ZSH_SECURE_FREE)
+CONFIGURE_ARGS+=	--enable-zsh-secure-free
 .endif
 
 .if defined(WITH_ZSH_MAILDIR)
@@ -100,6 +106,12 @@
 CONFIGURE_ARGS+=	--disable-multibyte
 .endif
 
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+=	--enable-zsh-debug
+.else
+CONFIGURE_ARGS+=	--disable-zsh-debug
+.endif
+
 post-patch:
 	@${SED} -i "" -e "s,link=dynamic,link=either," \
 		${WRKSRC}/Src/Modules/*.mdd


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



More information about the freebsd-ports-bugs mailing list