Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] Segfault unmetafying empty string
- X-seq: zsh-workers 43925
- From: dana <dana@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: [BUG] Segfault unmetafying empty string
- Date: Fri, 21 Dec 2018 10:58:02 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=oDEGHdQ5z6FSpiRCKyjJ2COstQ9AbkQrdxU1wybBw18=; b=bLsZp0oRePelLrmAd/CDbFRk6CJDCVuMioFZY1mVVb4aAUtl9V1CGpbFjWYNN0ulve ca8mWUFW1AH5xyBIxxOLLwlUKsi4ViIl9U1UG2Qn8C/ySaEyKjfz+DczHLi23DNWXvMD SOEIFaBSznKNVBOa2TyA7CgJdkQdz41/eGSvIG/REqUT02sMoYF98JBtipDFG0e1RlBU kfDf+KvZGthTMwaf+QtjwEJXmcooXLaunpAyAFXDyfdYMzA+/B+CzCE7VqMNfCUhjt7h U17VL4+J4c1EfWz/l/ec6x96Qk1lqXGwiz6OdAKw23jUIQTRgadCSk1gM1rvRb8Dldlr C5JQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This crashes the shell for me on 5.4.2 and master:
% compdef _foo foo
% _foo() { local -a x; : <<< ${(F)x/y} }
% foo <TAB>
(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. Not sure where's best to deal with that
dana
#0 0x000055b20caa9460 in unmetafy (s=0x55b20cabddda "", len=0x7fff1e0485a0)
at utils.c:4836
#1 0x000055b20ca23eb7 in getherestr (fn=0x7f124bbb2248) at exec.c:4514
#2 0x000055b20ca2145b in execcmd_exec (state=0x7fff1e048e30,
eparams=0x7fff1e048a50, input=0, output=0, how=18, last1=2,
close_if_forked=-1) at exec.c:3631
#3 0x000055b20ca1c7e6 in execpline2 (state=0x7fff1e048e30, pcode=67, how=18,
input=0, output=0, last1=0) at exec.c:1927
#4 0x000055b20ca1b39c in execpline (state=0x7fff1e048e30, slcode=6146,
how=18, last1=0) at exec.c:1658
#5 0x000055b20ca1a63f in execlist (state=0x7fff1e048e30, dont_change_job=1,
exiting=0) at exec.c:1413
#6 0x000055b20ca19c7a in execode (p=0x55b20e865930, dont_change_job=1,
exiting=0, context=0x55b20cab3042 "shfunc") at exec.c:1192
#7 0x000055b20ca282c5 in runshfunc (prog=0x55b20e865930, wrap=0x0,
name=0x7f124bbb2168 "_foo") at exec.c:5974
#8 0x00007f124bfe4ebf in comp_wrapper (prog=0x55b20e865930, w=0x0,
name=0x7f124bbb2168 "_foo") at complete.c:1524
#9 0x000055b20ca280a8 in runshfunc (prog=0x55b20e865930,
wrap=0x7f124c203de0 <wrapper>, name=0x7f124bbb2168 "_foo") at exec.c:5958
#10 0x000055b20ca2788b in doshfunc (shfunc=0x55b20e8b7bf0,
doshargs=0x7f124bbb6ba8, noreturnval=0) at exec.c:5824
Messages sorted by:
Reverse Date,
Date,
Thread,
Author