From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3430 invoked from network); 30 Apr 2009 21:23:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, FB_WORD1_END_DOLLAR autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Apr 2009 21:23:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 31626 invoked from network); 30 Apr 2009 21:22:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Apr 2009 21:22:56 -0000 Received: (qmail 17020 invoked by alias); 30 Apr 2009 21:22:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26912 Received: (qmail 17002 invoked from network); 30 Apr 2009 21:22:50 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Apr 2009 21:22:50 -0000 Received: from mail-ew0-f162.google.com (mail-ew0-f162.google.com [209.85.219.162]) by bifrost.dotsrc.org (Postfix) with ESMTP id DAA478028C71 for ; Thu, 30 Apr 2009 23:20:20 +0200 (CEST) Received: by ewy6 with SMTP id 6so1411569ewy.45 for ; Thu, 30 Apr 2009 14:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=aVMyZvSD7i6/uPwUQLy4+34aQtvoqRidxCs8G1aMQ0c=; b=eHSEY1tqHTk/fBl1rvMD+73RpmGXm8U0ZXYs+m60zzwBmTf0btPREGEkzY3CnVGMp8 /D9LC/xcfjW3DHKrcPDpzHwZ6tbLjbCfjC+tAnuzWXwzmyzYjsWNsdSluU6T1BWf2l09 aaNHx5k70IBvV1thM8U+0olhe+PXQycDRNzUg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=BuKM2ubYFAfxn3bp3Xnl34gvW+uQrMoDysp4B7NfJpE5FI9fgDiajlZb6f8lpz8/Hm ZzhfVD6Tajvs59PWcSvzmsMYg8xFt8qCbDEgTJFOFd4PfElFYudM3oEm7jVlKm965CgH gaB0+lPsMSYTx/LI238d0mlZXm+dmc2f3l4w4= MIME-Version: 1.0 Received: by 10.216.70.135 with SMTP id p7mr525125wed.138.1241126566112; Thu, 30 Apr 2009 14:22:46 -0700 (PDT) In-Reply-To: <200904301354.n3UDsoNM021549@news01.csr.com> References: <200904301354.n3UDsoNM021549@news01.csr.com> From: =?ISO-8859-1?Q?Murilo_Opsfelder_Ara=FAjo?= Date: Thu, 30 Apr 2009 18:22:26 -0300 Message-ID: Subject: Re: zsh seg fault when TERM = linux To: Peter Stephenson Cc: zsh-workers@sunsite.dk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV 0.92.1/9308/Thu Apr 30 19:19:03 2009 on bifrost X-Virus-Status: Clean On Thu, Apr 30, 2009 at 10:54 AM, Peter Stephenson wrote: > =3D?ISO-8859-1?Q?Murilo_Opsfelder_Ara=3DFAjo?=3D wrote: >> TERM env var on client side is set to 'linux': >> >> server$ gdb zsh >> (gdb) bt >> #0 =A00x283784bd in strlen () from /lib/libc.so.7 >> #1 =A00x282f600e in cgetset () from /lib/libc.so.7 >> #2 =A00x282f64f2 in cgetent () from /lib/libc.so.7 >> #3 =A00x2824940e in _nc_read_termcap_entry () from /lib/libncursesw.so.7 >> #4 =A00x2826accf in _nc_read_entry () from /lib/libncursesw.so.7 >> #5 =A00x28268d47 in _nc_setupterm () from /lib/libncursesw.so.7 >> #6 =A00x2823d928 in tgetent () from /lib/libncursesw.so.7 >> #7 =A00x0807bd29 in init_term () >> #8 =A00x0809593b in setstrvalue () >> #9 =A00x08099ba7 in assignsparam () >> #10 0x0809ab3e in createparamtable () >> #11 0x0807b9df in setupvals () >> #12 0x0807d6ce in zsh_main () >> #13 0x08052e32 in main () >> (gdb) >> >> Does gdb seem to be OK? > > Yes, the backtrace makes sense. =A0However, the crash is down inside the > library code, where zsh calls tgetent(). =A0The shell simply passes down > the terminal name, i.e. the string "linux", and maybe a buffer. =A0It's > going through calls to ncursesw and libc, which is correct. > > Do you have the configuration for this version of zsh? =A0Can you see if > the option TGETENT_ACCEPTS_NULL is #define'd in config.h? =A0It should be > under Linux, but if it wasn't it might be that the 2048-byte buffer was > too short. =A0If the option is set, it's hard to see how the shell could > be causing this. =A0Indeed, I see in the manual page for tgetent that the > buffer pointer is ignored, although it wasn't specially about ncursesw. > > Can you post the output of "infocmp -C linux" on the system where it's > crashing? > > Thanks. > > -- > Peter Stephenson =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Softwar= e Engineer > CSR PLC, Churchill House, Cambridge Business Park, Cowley Road > Cambridge, CB4 0WZ, UK =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0Tel: +44 (0)1223 692070 > The server side /etc/zshrc: http://pastebin.com/m65da7ea1 How can I see in zsh of server side if TGETENT_ACCEPTS_NULL is set? On the server side (where zsh crashes) there is no command 'infocmp'. The server is running FreeBSD. On the client side, here is the output of 'infocmp -C linux': http://pastebin.com/m352212c1 Thanks in advance. --=20 Murilo Opsfelder Araujo mopsfelder@gmail.com {murilo,panda}@bsd.com.br BSD will never die. "Tempo dif=EDcil esse em que estamos, em que =E9 mais f=E1cil quebrar um =E1tomo do que um preconceito." - Albert Einstein