From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8386 invoked from network); 4 May 2004 09:26:55 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by ns1.primenet.com.au with SMTP; 4 May 2004 09:26:55 -0000 Received: (qmail 30220 invoked from network); 4 May 2004 09:26:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 May 2004 09:26:38 -0000 Received: (qmail 25881 invoked by alias); 4 May 2004 09:26:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19871 Received: (qmail 25870 invoked from network); 4 May 2004 09:26:36 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 4 May 2004 09:26:33 -0000 Received: (qmail 30045 invoked from network); 4 May 2004 09:26:32 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 4 May 2004 09:26:31 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i449Q3v26922 for ; Tue, 4 May 2004 09:26:04 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id ; Tue, 4 May 2004 10:25:34 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 4 May 2004 10:27:20 +0100 To: zsh-workers@sunsite.dk, Christian Anthon , 245974@bugs.debian.org Subject: Re: Bug#245974: zsh: export LC_ALL=da_DK causes segfault In-reply-to: "Clint Adams"'s message of "Tue, 04 May 2004 00:14:23 EDT." <20040504041423.GA31086@scowler.net> Date: Tue, 04 May 2004 10:26:03 +0100 Message-ID: <14327.1083662763@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 04 May 2004 09:27:20.0058 (UTC) FILETIME=[FF9FA5A0:01C431B9] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.7 required=6.0 tests=BAYES_80 autolearn=no version=2.63 X-Spam-Hits: 1.7 Clint Adams wrote: > > Seems that when LC_TIME (or LC_ALL or LANG) is set to a locale such as > > da_DK or de_DE, wherein am_pm is set to null strings, zsh will segfault > > upon prompt-expanding %p or %P. Seems that the first argument to > > So, when am_pm is set to null strings, strftime() with format "%p" or > "%P" will return 0, which zsh is ill-equipped to handle. > The following patch avoids the segfault. I hope there's a better way to > do this. Yes, the right way to do it is to handle `0' properly, which says the array is in an indeterminate state and hence the shell should tidy up. The current patch is not the right way to do it. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************