From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13656 invoked by alias); 5 Sep 2016 18:25:44 -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: 39184 Received: (qmail 15944 invoked from network); 5 Sep 2016 18:25:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f179.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.179):SA:0(0.0/5.0):. Processed in 0.756067 secs); 05 Sep 2016 18:25:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Ikpt0fZ8RLcEs8G7AREjatXYP0qp5jMO4fwFkJFMvcw=; b=Cm64ma8Y4qfzLXklDkWJvJKAFbx+wbNyMmqFkiJ1G6kMCrw47WvEq7swlo9WDKwJ3R g0oMPf/vbVtZ6/GmmtVD0U0SrMktb914Fv9KvyC5GfEMxY6CAXIYpdcJW2ojlWBE8Y11 t3A+F+lLAe+ypQoP2yJRfhraHJ5LJnaf/gsrVpjAJ+2GTCTeloWp5kybU3RhfbfdcH2g vXFhYhA4eFGPj+eIBXlYSCC2NPkLdvvHdYlrj27V/af3PxysDxKa3Tuid1dVPFy/Ch2x bSp/J++ypT+RF0bq3vPTraNXkPC4Jt+TfuN6PVww9139j1i0CNEjw/enr9B3Y9iuACKs ekRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Ikpt0fZ8RLcEs8G7AREjatXYP0qp5jMO4fwFkJFMvcw=; b=RqspWy8nxh3awZueOMaD4JRJ57x/jplznV6IViDEwV1CTwlcPpl0BZmEBLXWdVNSWD 31fx9sc+aBPRJVt+6Ahts26YgzYnVRr0GRCQd9VIG7Q7dpoaw7H5ZX2Gu56Y4eopz4l2 HMN2AbUoPv8+tSlyc0prrtAXw+TzyEzsirQIAa3N2i6pglMZmmk8Ts4RYcdO7wBTVQm9 lyFKRMZ2oFWbg5s/tlONSzOo5cimH6ysKpVMjOX7KEMhiCB8M/pWG7nyPNrAh/CmfUcv IQoKmkPAaA8gknmDKHSyVa0PpW1TTKgi576pBYaIXRL0lJs20G/+Ks8mFJ6cTo7QIDMD gSrg== X-Gm-Message-State: AE9vXwPOb0uxu0E5OxYWFdxuyNZfJ4DzfkRvFJpS3qu+cjo0rcQOesUDi+1MvqKY7Tr3l37YoU1qW0xbbaZx4Q== X-Received: by 10.55.170.208 with SMTP id t199mr38224364qke.151.1473095939992; Mon, 05 Sep 2016 10:18:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Bart Schaefer Date: Mon, 5 Sep 2016 10:18:57 -0700 Message-ID: Subject: Re: Crash on tab completion To: Zsh hackers list Cc: Patrick Hilhorst Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 5, 2016 at 3:42 AM, Patrick Hilhorst wrote: > Hello all, > > I recently made a typo in my .zshrc that caused tab complete to crash zsh= : > > alias cpp_check=3D"clang-tidy > -checks=3D\"-*,cppcoreguidelines-*,clang-analyzer-*,misc-*,modernize-*,pe= rformance-*,readability-*" > > I presume this is because it tries to expand all asterisks. If any more > documentation is required, you can reach me at this address, since I=E2= =80=99m not > subscribed to this mailing list. % cpp_check zle_tricky.c:658: BUG: 0 <=3D wb (-86) <=3D zlemetacs (9) <=3D we (9) is not true! BUG: substring ends in the middle of a metachar in ztrsub() The "BUG: substring ..." line repeats 16 times and then zsh crashes. Happens with the latest build from the repository. Doesn't have anything to do with the glob characters, it's all because of the un-terminated double-quote in the expansion of the alias. Also crashes when compsys is NOT loaded, but without ever printing the second BUG: line. Seems to be because wb is computed with the alias expanded, but then the alias is unwound before trying to update the command line.