From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIMWL_WL_MED autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 1b72c09a for ; Mon, 24 Dec 2018 14:47:33 +0000 (UTC) Received: (qmail 3850 invoked by alias); 24 Dec 2018 14:47:19 -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: List-Unsubscribe: X-Seq: 43938 Received: (qmail 5553 invoked by uid 1010); 24 Dec 2018 14:47:19 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-1.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(80.0.253.65):SA:0(-2.0/5.0):. Processed in 4.96821 secs); 24 Dec 2018 14:47:19 -0000 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [82.132.223.187] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.3 cv=A45CwZeG c=1 sm=1 tr=0 a=icUQfxtjMgzJ1iKB4E4aQg==:117 a=icUQfxtjMgzJ1iKB4E4aQg==:17 a=IkcTkHD0fZMA:10 a=l7-10Vd74D3l6pVPI3oA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1545662133; bh=R+5cl0SGG/kJNJPvP1zc4WqFHEBR3MmnKyeCffj3L+w=; h=Date:In-Reply-To:References:Subject:To:From; b=Np9vmRE0Qi2BlKoc7zbDEcDSexdYMXtR1/kSJrgAOh0BB9eR1DdT93S47xiFvAlaQ L+8V3YxuXh8WeXpA3k5tTZrsknUUU8SRDh5aCFh3wb8ACn9iIdtPmD3AgK0/+Sgg2a yf6ct3Cj4b9j5pPhknC9lQoVP5tWLDS1KTEkzm4u/Zjjy/o+eTyOhGif5+A5kD8hAx qszfFgMGAtlB0ssnTLIalDYLcY1qkEjZJLRwoaaUcLPttTDdeDHgL7ssVgQcJLm2QP Rg3isdDyBewzNmz9paxBWgTEahVi8VE0Oe/Fb87Y1Fw0gU3+7FlYZYe4BUcpR7YPwh ESCGOdMU6mLHg== Date: Mon, 24 Dec 2018 14:35:26 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <8448D48B-773D-4781-8F22-61B84A50BC9B@dana.is> References: <8448D48B-773D-4781-8F22-61B84A50BC9B@dana.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [BUG] Segfault unmetafying empty string To: zsh-workers@zsh.org From: Peter Stephenson Message-ID: X-CMAE-Envelope: MS4wfKOCif4G9iA6XTK5eNQXvK1Y/XKG+vhnsrRewy29gAIimQzqOCaV1128hSb+XlUB2PLzXX5eIZjujoAJ8Brii+Z1rwJscnu06lsqKUtohs/d4XnPd3H6 N0oP0v0aQvUwYRtrn02OiGkCONbe8nZFs12wJD/JQ/fA0eD5Mz6giPhQvXngMcOPG5DQUwOcec33aA== On my mobile at the moment, but the safe fix for this is a dupstring near t= he top of sepjoin if *s is null and heap is true - we already use ztrdup in= the other case so this looks obvious=2E I'll commit it in the new year if = no one has=2E pws On 21 December 2018 16:58:02 GMT, dana wrote: >This crashes the shell for me on 5=2E4=2E2 and master: > > % compdef _foo foo > % _foo() { local -a x; : <<< ${(F)x/y} } > % foo > >(For some reason i can only replicate it during completion; idk why) > >It seems like it's touching read-only memory trying to unmetafy an >empty >string=2E Not sure where's best to deal with that > >dana > > >#0 0x000055b20caa9460 in unmetafy (s=3D0x55b20cabddda "", >len=3D0x7fff1e0485a0) > at utils=2Ec:4836 >#1 0x000055b20ca23eb7 in getherestr (fn=3D0x7f124bbb2248) at exec=2Ec:45= 14 >#2 0x000055b20ca2145b in execcmd_exec (state=3D0x7fff1e048e30, > eparams=3D0x7fff1e048a50, input=3D0, output=3D0, how=3D18, last1=3D2, > close_if_forked=3D-1) at exec=2Ec:3631 >#3 0x000055b20ca1c7e6 in execpline2 (state=3D0x7fff1e048e30, pcode=3D67, >how=3D18, > input=3D0, output=3D0, last1=3D0) at exec=2Ec:1927 >#4 0x000055b20ca1b39c in execpline (state=3D0x7fff1e048e30, slcode=3D614= 6, > how=3D18, last1=3D0) at exec=2Ec:1658 >#5 0x000055b20ca1a63f in execlist (state=3D0x7fff1e048e30, >dont_change_job=3D1, > exiting=3D0) at exec=2Ec:1413 >#6 0x000055b20ca19c7a in execode (p=3D0x55b20e865930, dont_change_job=3D= 1, > exiting=3D0, context=3D0x55b20cab3042 "shfunc") at exec=2Ec:1192 >#7 0x000055b20ca282c5 in runshfunc (prog=3D0x55b20e865930, wrap=3D0x0, > name=3D0x7f124bbb2168 "_foo") at exec=2Ec:5974 >#8 0x00007f124bfe4ebf in comp_wrapper (prog=3D0x55b20e865930, w=3D0x0, > name=3D0x7f124bbb2168 "_foo") at complete=2Ec:1524 >#9 0x000055b20ca280a8 in runshfunc (prog=3D0x55b20e865930, >wrap=3D0x7f124c203de0 , name=3D0x7f124bbb2168 "_foo") at >exec=2Ec:5958 >#10 0x000055b20ca2788b in doshfunc (shfunc=3D0x55b20e8b7bf0, > doshargs=3D0x7f124bbb6ba8, noreturnval=3D0) at exec=2Ec:5824 --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E