From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27629 invoked from network); 31 Aug 2008 08:40:09 -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 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; 31 Aug 2008 08:40:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 75215 invoked from network); 31 Aug 2008 08:39:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Aug 2008 08:39:55 -0000 Received: (qmail 10684 invoked by alias); 31 Aug 2008 08:39:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25565 Received: (qmail 10661 invoked from network); 31 Aug 2008 08:39:40 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 31 Aug 2008 08:39:40 -0000 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by bifrost.dotsrc.org (Postfix) with ESMTP id 44E178030848 for ; Sun, 31 Aug 2008 10:39:35 +0200 (CEST) Received: by ey-out-2122.google.com with SMTP id 25so539561eya.3 for ; Sun, 31 Aug 2008 01:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=zKh8HaciZekBbJVafryZ3fQ/ZRutI5qwTsqblIxWeWs=; b=edDkWbamnr9wpwsKcshavSz/ZlgWk3MEo6t1VzcV2R1mD6ViZsuAmH6nLIvscAI+xv ykkFGUQ5zY6Vru8H31762268Kh4NH2HjbD5GLlqSjJJOWAjJjEYfhliF4m56ujWDSwOa ddP9GotbOooPp/GAAZsFf6etm7TirydjXku0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Lt1zZt9XJQ2G4P2i/RMFLleBJChgGrDPVuGgopQCFZGM5M9CbjeXKgaao9ZgcPz9T+ 6fcLAaCA2DUrya1LDZ1FcDzVVcH49hvu0bNYwAFvnOe5w+ry42WgBJkuMTomdgTSHGwT xZFmOtVwLh0+rYWajYBq9mjdi2bzm8PYgjDKU= Received: by 10.210.78.16 with SMTP id a16mr4496105ebb.173.1220171975817; Sun, 31 Aug 2008 01:39:35 -0700 (PDT) Received: by 10.210.73.14 with HTTP; Sun, 31 Aug 2008 01:39:35 -0700 (PDT) Message-ID: <237967ef0808310139x4031c054pe69360823916bd54@mail.gmail.com> Date: Sun, 31 Aug 2008 10:39:35 +0200 From: "Mikael Magnusson" To: zsh-workers Subject: Segfault on =() expansion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: ClamAV 0.92.1/8122/Sun Aug 31 03:04:56 2008 on bifrost X-Virus-Status: Clean I could reproduce this on all my remote ssh shells, ranging from 4.2.3 to my local current cvs. % a==(echo foo); : & cat $a [1] 14645 foo % [1] + done : % a==(echo foo); : & cat $a zsh: segmentation fault zsh -f Let's see if I can get a backtrace... *waits for recompile*. Program received signal SIGSEGV, Segmentation fault. 0x0806d364 in untokenize (s=0x0) at exec.c:1639 1639 if (*s) { (gdb) bt full #0 0x0806d364 in untokenize (s=0x0) at exec.c:1639 No locals. #1 0x0806e224 in addvars (state=0xafc54c5c, pc=0xa7bd35e0, addflags=0) at exec.c:2068 pm = (Param) 0x80ac572 val = 0xc
allexp = 0 myflags = 0 vl = (LinkList) 0xafc54b34 xtr = 0 isstr = 1 htok = 1 arr = (char **) 0xafc54bb0 ptr = (char **) 0x0 name = 0xa7bd3660 "a" flags = 0 opc = (Wordcode) 0xa7bd35e4 ac = 5 svl = {list = {first = 0xafc54b28, last = 0xafc54b28, flags = 0}, node = { next = 0xafc54b28, prev = 0xafc54b28, dat = 0x0}} __n0 = {next = 0x0, prev = 0xafc54b34, dat = 0x0} #2 0x0806b7c1 in execsimple (state=0xafc54c5c) at exec.c:992 code = 5 lv = 1 #3 0x0806ba68 in execlist (state=0xafc54c5c, dont_change_job=0, exiting=0) at exec.c:1094 donedebug = 0 next = (Wordcode) 0xa7bd35f0 code = 11329 ret = 1103269876 cj = -1 ---Type to continue, or q to quit--- csp = 0 ltype = 354 old_pline_level = 0 old_list_pipe = 0 oldlineno = 4 oldnoerrexit = 0 donetrap = 0 #4 0x0806b6f5 in execode (p=0xa7bd35b0, dont_change_job=0, exiting=0) at exec.c:965 s = {prog = 0xa7bd35b0, pc = 0xa7bd35ec, strs = 0xa7bd3620 "\213\210echo foo\211"} #5 0x08084a7c in loop (toplevel=1, justonce=0) at init.c:181 toksav = 1 prog = (Eprog) 0xa7bd35b0 #6 0x080874e2 in zsh_main (argc=2, argv=0xafc54d94) at init.c:1407 t = (char **) 0xafc54d9c t0 = 157 #7 0x080551f6 in main (argc=Cannot access memory at address 0x48 ) at ./main.c:93 No locals. Changing (*s) to (s && *s) fixes the crash, but maybe something else is fishy. With that change, $a appears to be empty instead of the crash. % a==(echo foo); : & echo $a [1] 18053 /tmp/zsh5NP27e % [1] + done : % a==(echo foo); : & echo $a [1] 18054 % [1] + done : -- Mikael Magnusson