From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6444 invoked from network); 30 Apr 2009 13:57:17 -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.4 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 13:57:17 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 7556 invoked from network); 30 Apr 2009 13:57:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Apr 2009 13:57:08 -0000 Received: (qmail 25193 invoked by alias); 30 Apr 2009 13:57:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26909 Received: (qmail 25174 invoked from network); 30 Apr 2009 13:57:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Apr 2009 13:57:01 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 897B18028C71 for ; Thu, 30 Apr 2009 15:54:34 +0200 (CEST) Received: from rly11d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly11d.srv.mailcontrol.com (MailControl) with ESMTP id n3UDuXUW021016 for ; Thu, 30 Apr 2009 14:56:56 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly11d.srv.mailcontrol.com (MailControl) id n3UDuUL3020672 for zsh-workers@sunsite.dk; Thu, 30 Apr 2009 14:56:30 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly11d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id n3UDuL1x019619; Thu, 30 Apr 2009 14:56:30 +0100 (BST) Received: from news01.csr.com ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Apr 2009 14:54:51 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n3UDsoxL021553; Thu, 30 Apr 2009 14:54:51 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n3UDsoNM021549; Thu, 30 Apr 2009 14:54:50 +0100 Message-Id: <200904301354.n3UDsoNM021549@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: =?ISO-8859-1?Q?Murilo_Opsfelder_Ara=FAjo?= cc: zsh-workers@sunsite.dk Subject: Re: zsh seg fault when TERM = linux In-reply-to: References: Comments: In-reply-to =?ISO-8859-1?Q?Murilo_Opsfelder_Ara=FAjo?= message dated "Thu, 30 Apr 2009 09:35:04 -0300." Date: Thu, 30 Apr 2009 14:54:49 +0100 From: Peter Stephenson X-OriginalArrivalTime: 30 Apr 2009 13:54:51.0462 (UTC) FILETIME=[3BA60660:01C9C99B] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.1.121 X-Virus-Scanned: ClamAV 0.92.1/9307/Thu Apr 30 13:49:56 2009 on bifrost X-Virus-Status: Clean =?ISO-8859-1?Q?Murilo_Opsfelder_Ara=FAjo?= wrote: > TERM env var on client side is set to 'linux': > > server$ gdb zsh > (gdb) bt > #0 0x283784bd in strlen () from /lib/libc.so.7 > #1 0x282f600e in cgetset () from /lib/libc.so.7 > #2 0x282f64f2 in cgetent () from /lib/libc.so.7 > #3 0x2824940e in _nc_read_termcap_entry () from /lib/libncursesw.so.7 > #4 0x2826accf in _nc_read_entry () from /lib/libncursesw.so.7 > #5 0x28268d47 in _nc_setupterm () from /lib/libncursesw.so.7 > #6 0x2823d928 in tgetent () from /lib/libncursesw.so.7 > #7 0x0807bd29 in init_term () > #8 0x0809593b in setstrvalue () > #9 0x08099ba7 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. However, the crash is down inside the library code, where zsh calls tgetent(). The shell simply passes down the terminal name, i.e. the string "linux", and maybe a buffer. It's going through calls to ncursesw and libc, which is correct. Do you have the configuration for this version of zsh? Can you see if the option TGETENT_ACCEPTS_NULL is #define'd in config.h? It should be under Linux, but if it wasn't it might be that the 2048-byte buffer was too short. If the option is set, it's hard to see how the shell could be causing this. Indeed, 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 Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070