From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9333 invoked by alias); 30 Apr 2013 05:35:33 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31364 Received: (qmail 1044 invoked from network); 30 Apr 2013 05:35:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GPaTgBr2BTD2JRwY5KnIdzef+NpfxeyEdwH5EFqQnW8=; b=VKeaTvJPMHwmZFkQGrkevsnWEfAbtPbMhV0MVRXjcWgUstMrA/fSPkP15ZCI25qsy7 ckRutJxqTx74xCTJOIky/ZAKvkZ9N4BSzMzBUxhkwBlaS2cnhMHfVkNnyPGorVQGieaQ rkf5bzdWSMFiLoV3LpKccuCSVASFgYuUIX8qgG/2jLDipZJ9Nuc57PKiL5hG56thfIrn zAzNUMyRuFPWTlekT/NE9NvgKwCBNpka/kmzOlC793PAbJpj/0V40lPs4ajObsbmjWwY Q+pYzQjx5AVijxFrUAwgs3ARP142rIcYKzdGBed2LtzdD19ux6YCIPuUqgZ4dXmeOSA6 hYGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eatnumber1.com; s=google; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GPaTgBr2BTD2JRwY5KnIdzef+NpfxeyEdwH5EFqQnW8=; b=ksDiRci9Ch8hPu7ci9XtdkR2DpG1+jxjFUh1KVeIaARhNgPN95nvSYkknDU23IKgRt 7vhozBKVHBWDYrRLCf24CefKqRHoY+viDg/ysAq5lVLY5zeQ55J4p4WgLHgkAyry8MvX ntbQHrYhmuCjyhln+Lv5Ipth6tCFZtSDHyUss= X-Received: by 10.50.51.226 with SMTP id n2mr9790918igo.25.1367300114116; Mon, 29 Apr 2013 22:35:14 -0700 (PDT) MIME-Version: 1.0 Sender: eatnumber1@gmail.com In-Reply-To: <130429141717.ZM16337@torch.brasslantern.com> References: <130426180127.ZM18989@torch.brasslantern.com> <20130429094700.6c8db4a9@pwslap01u.europe.root.pri> <130429111141.ZM16086@torch.brasslantern.com> <130429114756.ZM16140@torch.brasslantern.com> <130429141717.ZM16337@torch.brasslantern.com> From: Russell Harmon Date: Mon, 29 Apr 2013 22:34:54 -0700 X-Google-Sender-Auth: LdwdprZJW4BGhfEOzgwjC4GU7so Message-ID: Subject: Re: Augmenting a Sticky Emulation Mode To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=14dae93407459a77cc04db8d5da4 --14dae93407459a77cc04db8d5da4 Content-Type: text/plain; charset=UTF-8 It seems as though my crash is also related to this bug. According to the docs, BRACE_EXPAND is an alias for NO_IGNORE_BRACES. emulate -R sh +o ignorebraces -c 'foo() { setopt; }' works and doesn't crash the shell -- Russell Harmon On Mon, Apr 29, 2013 at 2:17 PM, Bart Schaefer wrote: > On Apr 29, 11:47am, Bart Schaefer wrote: > } > } OK, I found the problem, but I don't know what to do to fix it. > > This seems to do it. > > diff --git a/Src/init.c b/Src/init.c > index 8467a73..49ac124 100644 > --- a/Src/init.c > +++ b/Src/init.c > @@ -281,9 +281,10 @@ parseargs(char **argv, char **runscript) > > /**/ > static void > -parseopts_insert(LinkList optlist, void *ptr) > +parseopts_insert(LinkList optlist, void *base, int optno) > { > LinkNode node; > + void *ptr = base + (optno < 0 ? -optno : optno); > > for (node = firstnode(optlist); node; incnode(node)) { > if (ptr < getdata(node)) { > @@ -390,7 +391,7 @@ parseopts(char *nam, char ***argvp, char *new_opts, > char **cmdp, > if (dosetopt(optno, action, !nam, new_opts) && nam) { > WARN_OPTION("can't change option: %s", *argv); > } else if (optlist) { > - parseopts_insert(optlist, new_opts+optno); > + parseopts_insert(optlist, new_opts, optno); > } > } > break; > @@ -415,7 +416,7 @@ parseopts(char *nam, char ***argvp, char *new_opts, > char **cmdp, > if (dosetopt(optno, action, !nam, new_opts) && nam) { > WARN_OPTION("can't change option: -%c", **argv); > } else if (optlist) { > - parseopts_insert(optlist, new_opts+optno); > + parseopts_insert(optlist, new_opts, optno); > } > } > } > > -- > Barton E. Schaefer > --14dae93407459a77cc04db8d5da4--