zsh-workers
 help / color / mirror / code / Atom feed
* Cores almost on demand in patcompile()
@ 2016-10-09  9:00 Sebastian Gniazdowski
  2016-10-09  9:16 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-09  9:00 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Bart Schaefer, Peter Stephenson

[-- Attachment #1: Type: text/plain, Size: 5713 bytes --]

Hello,
I have this tool that shows me Git log (screenshot attached). I've
added a commit whose message apparently triggers cores. Luckily I have
-g, no -O2, near-HEAD (ccc0b6f) zsh running with ulimit -c unlimited.

Making things visual, the collection of cores is:
core.54623 core.80705 core.89143 core.89731 core.90081

easily to extend. The back traces are the same in 4 tested back traces:

(lldb) target create "/usr/local/bin/zsh-5.2-dev-2" --core "/cores/core.90081"
warning: (x86_64) /cores/core.90081 load command 134 LC_SEGMENT_64 has
a fileoff + filesize (0x28b73000) that extends beyond the end of the
file (0x28b72000), the segment will be truncated to match
warning: (x86_64) /cores/core.90081 load command 135 LC_SEGMENT_64 has
a fileoff (0x28b73000) that extends beyond the end of the file
(0x28b72000), ignoring this section
Core file '/cores/core.90081' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0x0000, 0x000000010e5d42cb
zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh
 � initial commit of skylite21 submission\"\x19", inflags=200,
endexp=0x0000000000000000) + 1435 at pattern.c:651, stop reason =
signal SIGSTOP
  * frame #0: 0x000000010e5d42cb
zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh
 � initial commit of skylite21 submission\"\x19", inflags=200,
endexp=0x0000000000000000) + 1435 at pattern.c:651
    frame #1: 0x000000010e5833af
zsh-5.2-dev-2`compgetmatch(pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh
 � initial commit of skylite21 submission\"\x19",
flp=0x00007fff5169a664, replstrp=0x00007fff5169a658) + 127 at
glob.c:2612
    frame #2: 0x000000010e5832e1
zsh-5.2-dev-2`getmatch(sp=0x00007fff5169ae40,
pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh
 � initial commit of skylite21 submission\"\x19", fl=16, n=1,
replstr=0x0000000000000000) + 49 at glob.c:2652
    frame #3: 0x000000010e5eee37
zsh-5.2-dev-2`paramsubst(l=0x00007fff5169b188, n=0x00007fff5169b170,
str=0x00007fff5169b020, qt=1, pf_flags=4,
ret_flags=0x00007fff5169b0dc) + 15527 at subst.c:3033
    frame #4: 0x000000010e5e8475
zsh-5.2-dev-2`stringsubst(list=0x00007fff5169b188,
node=0x00007fff5169b170, pf_flags=4, ret_flags=0x00007fff5169b0dc,
asssub=0) + 1109 at subst.c:247
    frame #5: 0x000000010e5e7a00
zsh-5.2-dev-2`prefork(list=0x00007fff5169b188, flags=6,
ret_flags=0x00007fff5169b0dc) + 256 at subst.c:85
    frame #6: 0x000000010e57119e
zsh-5.2-dev-2`addvars(state=0x00007fff5169bf40, pc=0x00007f93230620c0,
addflags=0) + 606 at exec.c:2380
    frame #7: 0x000000010e56b69d
zsh-5.2-dev-2`execsimple(state=0x00007fff5169bf40) + 317 at
exec.c:1155
    frame #8: 0x000000010e56ab28
zsh-5.2-dev-2`execlist(state=0x00007fff5169bf40, dont_change_job=1,
exiting=0) + 1096 at exec.c:1293
    frame #9: 0x000000010e5a8b14
zsh-5.2-dev-2`execfor(state=0x00007fff5169bf40, do_exec=0) + 1716 at
loop.c:175
    frame #10: 0x000000010e576ee0
zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169bf40,
eparams=0x00007fff5169bbf0, input=0, output=0, how=2, last1=2) + 16272
at exec.c:3652
    frame #11: 0x000000010e572989
zsh-5.2-dev-2`execpline2(state=0x00007fff5169bf40, pcode=2947, how=2,
input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #12: 0x000000010e56bc90
zsh-5.2-dev-2`execpline(state=0x00007fff5169bf40, slcode=106498,
how=2, last1=0) + 1008 at exec.c:1567
    frame #13: 0x000000010e56ad4e
zsh-5.2-dev-2`execlist(state=0x00007fff5169bf40, dont_change_job=1,
exiting=0) + 1646 at exec.c:1325
    frame #14: 0x000000010e56a6ac
zsh-5.2-dev-2`execode(p=0x00007f9324b40000, dont_change_job=1,
exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #15: 0x000000010e5709af
zsh-5.2-dev-2`runshfunc(prog=0x00007f9324b40000,
wrap=0x0000000000000000, name="__zcmdr-process-buffer") + 575 at
exec.c:5567
    frame #16: 0x000000010e5702b1
zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22a20,
doshargs=0x000000010e9dcb70, noreturnval=0) + 2049 at exec.c:5432
    frame #17: 0x000000010e5720fd
zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22a20,
args=0x000000010e9dcb70) + 541 at exec.c:5058
    frame #18: 0x000000010e57715a
zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169cd50,
eparams=0x00007fff5169ca00, input=0, output=0, how=2, last1=2) + 16906
at exec.c:3704
    frame #19: 0x000000010e572989
zsh-5.2-dev-2`execpline2(state=0x00007fff5169cd50, pcode=1347, how=2,
input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #20: 0x000000010e56bc90
zsh-5.2-dev-2`execpline(state=0x00007fff5169cd50, slcode=4098, how=2,
last1=0) + 1008 at exec.c:1567

First frame points to pattern.c:651. It is "next = PATNEXT(pscan);"
(my exact HEAD is: ccc0b6f). I did:

(lldb) p next
(Upat) $0 = 0x0000ff9324b59968
(lldb) p pscan
(Upat) $1 = 0x0000ff9324b59968
(lldb) p exp
(char *) $2 = 0x000000010e9e8ad8
"\xffffff88\xffffff84m\xffffff8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh
\xffffffe2\xffffff80\xffffff83\xffffffb3 initial commit of skylite21
submission"\x19"

Not sure what to do next. Two complete back traces are attached.

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: bt_core.89143.txt --]
[-- Type: text/plain, Size: 37214 bytes --]

# lldb /usr/local/bin/zsh-5.2-dev-2 -c /cores/core.89143                                                                        (git)-[master]
(lldb) target create "/usr/local/bin/zsh-5.2-dev-2" --core "/cores/core.89143"
warning: (x86_64) /cores/core.89143 load command 133 LC_SEGMENT_64 has a fileoff + filesize (0x28a73000) that extends beyond the end of the file (0x28a72000), the segment will be truncated to match
warning: (x86_64) /cores/core.89143 load command 134 LC_SEGMENT_64 has a fileoff (0x28a73000) that extends beyond the end of the file (0x28a72000), ignoring this section
Core file '/cores/core.89143' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0x0000, 0x000000010f7f42cb zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", inflags=200, endexp=0x0000000000000000) + 1435 at pattern.c:651, stop reason = signal SIGSTOP
  * frame #0: 0x000000010f7f42cb zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", inflags=200, endexp=0x0000000000000000) + 1435 at pattern.c:651
    frame #1: 0x000000010f7a33af zsh-5.2-dev-2`compgetmatch(pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", flp=0x00007fff5047a664, replstrp=0x00007fff5047a658) + 127 at glob.c:2612
    frame #2: 0x000000010f7a32e1 zsh-5.2-dev-2`getmatch(sp=0x00007fff5047ae40, pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", fl=16, n=1, replstr=0x0000000000000000) + 49 at glob.c:2652
    frame #3: 0x000000010f80ee37 zsh-5.2-dev-2`paramsubst(l=0x00007fff5047b188, n=0x00007fff5047b170, str=0x00007fff5047b020, qt=1, pf_flags=4, ret_flags=0x00007fff5047b0dc) + 15527 at subst.c:3033
    frame #4: 0x000000010f808475 zsh-5.2-dev-2`stringsubst(list=0x00007fff5047b188, node=0x00007fff5047b170, pf_flags=4, ret_flags=0x00007fff5047b0dc, asssub=0) + 1109 at subst.c:247
    frame #5: 0x000000010f807a00 zsh-5.2-dev-2`prefork(list=0x00007fff5047b188, flags=6, ret_flags=0x00007fff5047b0dc) + 256 at subst.c:85
    frame #6: 0x000000010f79119e zsh-5.2-dev-2`addvars(state=0x00007fff5047bf40, pc=0x00007fa36112bac0, addflags=0) + 606 at exec.c:2380
    frame #7: 0x000000010f78b69d zsh-5.2-dev-2`execsimple(state=0x00007fff5047bf40) + 317 at exec.c:1155
    frame #8: 0x000000010f78ab28 zsh-5.2-dev-2`execlist(state=0x00007fff5047bf40, dont_change_job=1, exiting=0) + 1096 at exec.c:1293
    frame #9: 0x000000010f7c8b14 zsh-5.2-dev-2`execfor(state=0x00007fff5047bf40, do_exec=0) + 1716 at loop.c:175
    frame #10: 0x000000010f796ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047bf40, eparams=0x00007fff5047bbf0, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #11: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047bf40, pcode=2947, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #12: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047bf40, slcode=106498, how=2, last1=0) + 1008 at exec.c:1567
    frame #13: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047bf40, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #14: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363aa1a10, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #15: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa363aa1a10, wrap=0x0000000000000000, name="__zcmdr-process-buffer") + 575 at exec.c:5567
    frame #16: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c0a2a0, doshargs=0x000000010fbfcb70, noreturnval=0) + 2049 at exec.c:5432
    frame #17: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c0a2a0, args=0x000000010fbfcb70) + 541 at exec.c:5058
    frame #18: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047cd50, eparams=0x00007fff5047ca00, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #19: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047cd50, pcode=1347, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #20: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047cd50, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #21: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047cd50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #22: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363a979f0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #23: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa363a979f0, wrap=0x0000000000000000, name="-zcmdrlist_mark_current_segment_in_current_element") + 575 at exec.c:5567
    frame #24: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa363a97a30, doshargs=0x000000010fc1f2e0, noreturnval=0) + 2049 at exec.c:5432
    frame #25: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa363a97a30, args=0x000000010fc1f2e0) + 541 at exec.c:5058
    frame #26: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047f120, eparams=0x00007fff5047d810, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #27: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047f120, pcode=32131, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #28: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047f120, slcode=3074, how=2, last1=0) + 1008 at exec.c:1567
    frame #29: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #30: 0x000000010f7c9e49 zsh-5.2-dev-2`execif(state=0x00007fff5047f120, do_exec=0) + 521 at loop.c:569
    frame #31: 0x000000010f796ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047f120, eparams=0x00007fff5047e2f0, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #32: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047f120, pcode=22147, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #33: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047f120, slcode=669698, how=2, last1=0) + 1008 at exec.c:1567
    frame #34: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #35: 0x000000010f7c995e zsh-5.2-dev-2`execwhile(state=0x00007fff5047f120, do_exec=0) + 510 at loop.c:454
    frame #36: 0x000000010f796ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047f120, eparams=0x00007fff5047edd0, input=0, output=0, how=18, last1=2) + 16272 at exec.c:3652
    frame #37: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047f120, pcode=22019, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #38: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047f120, slcode=1959938, how=18, last1=0) + 1008 at exec.c:1567
    frame #39: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #40: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363a7c7c0, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #41: 0x000000010f792794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff5047fc40, do_exec=0) + 196 at exec.c:5104
    frame #42: 0x000000010f796ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5047fc40, eparams=0x00007fff5047f8f0, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #43: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5047fc40, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #44: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5047fc40, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #45: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5047fc40, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #46: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa36398a310, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #47: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa36398a310, wrap=0x0000000000000000, name="__zcmdr-list") + 575 at exec.c:5567
    frame #48: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c49a00, doshargs=0x000000010fbf4528, noreturnval=0) + 2049 at exec.c:5432
    frame #49: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c49a00, args=0x000000010fbf4528) + 541 at exec.c:5058
    frame #50: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50480a50, eparams=0x00007fff50480700, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #51: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50480a50, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #52: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50480a50, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #53: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50480a50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #54: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x000000010fbf44c0, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #55: 0x000000010f781fef zsh-5.2-dev-2`eval(argv=0x00007fff50480b70) + 495 at builtin.c:5568
    frame #56: 0x000000010f7787f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-list", argv=0x00007fff50480b70, ops=0x00007fff50480e68, func=0) + 32 at builtin.c:5754
    frame #57: 0x000000010f778646 zsh-5.2-dev-2`eval_autoload(shf=0x00007fa360c49a00, name="__zcmdr-list", ops=0x00007fff50480e68, func=0) + 198 at builtin.c:2914
    frame #58: 0x000000010f77617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010fbf43e8, ops=0x00007fff50480e68, func=0) + 4494 at builtin.c:3194
    frame #59: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbf4360, assigns=0x0000000000000000, bn=0x000000010f838130) + 3238 at builtin.c:484
    frame #60: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff504819b0, eparams=0x00007fff50481660, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #61: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff504819b0, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #62: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff504819b0, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #63: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff504819b0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #64: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360c499c0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #65: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360c499c0, wrap=0x0000000000000000, name="__zcmdr-list") + 575 at exec.c:5567
    frame #66: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c49a00, doshargs=0x000000010fbf0c68, noreturnval=0) + 2049 at exec.c:5432
    frame #67: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c49a00, args=0x000000010fbf0c68) + 541 at exec.c:5058
    frame #68: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff504827c0, eparams=0x00007fff50482470, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #69: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff504827c0, pcode=4675, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #70: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff504827c0, slcode=12290, how=2, last1=0) + 1008 at exec.c:1567
    frame #71: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff504827c0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #72: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363a6c770, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #73: 0x000000010f792794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff504832e0, do_exec=0) + 196 at exec.c:5104
    frame #74: 0x000000010f796ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff504832e0, eparams=0x00007fff50482f90, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #75: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff504832e0, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #76: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff504832e0, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #77: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff504832e0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #78: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363985600, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #79: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa363985600, wrap=0x0000000000000000, name="__zcmdr-list-wrapper") + 575 at exec.c:5567
    frame #80: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c42600, doshargs=0x000000010fbec558, noreturnval=0) + 2049 at exec.c:5432
    frame #81: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c42600, args=0x000000010fbec558) + 541 at exec.c:5058
    frame #82: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff504840f0, eparams=0x00007fff50483da0, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #83: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff504840f0, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #84: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff504840f0, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #85: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff504840f0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #86: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x000000010fbec4e8, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #87: 0x000000010f781fef zsh-5.2-dev-2`eval(argv=0x00007fff50484210) + 495 at builtin.c:5568
    frame #88: 0x000000010f7787f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-list-wrapper", argv=0x00007fff50484210, ops=0x00007fff50484508, func=0) + 32 at builtin.c:5754
    frame #89: 0x000000010f778646 zsh-5.2-dev-2`eval_autoload(shf=0x00007fa360c42600, name="__zcmdr-list-wrapper", ops=0x00007fff50484508, func=0) + 198 at builtin.c:2914
    frame #90: 0x000000010f77617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010fbec3f8, ops=0x00007fff50484508, func=0) + 4494 at builtin.c:3194
    frame #91: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbec370, assigns=0x0000000000000000, bn=0x000000010f838130) + 3238 at builtin.c:484
    frame #92: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50485050, eparams=0x00007fff50484d00, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #93: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50485050, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #94: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50485050, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #95: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50485050, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #96: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360c425c0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #97: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360c425c0, wrap=0x0000000000000000, name="__zcmdr-list-wrapper") + 575 at exec.c:5567
    frame #98: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c42600, doshargs=0x000000010fbde6f0, noreturnval=0) + 2049 at exec.c:5432
    frame #99: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c42600, args=0x000000010fbde6f0) + 541 at exec.c:5058
    frame #100: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50485e60, eparams=0x00007fff50485b10, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #101: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50485e60, pcode=2243, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #102: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50485e60, slcode=3074, how=2, last1=0) + 1008 at exec.c:1567
    frame #103: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50485e60, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #104: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363982670, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #105: 0x000000010f792794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff50486980, do_exec=0) + 196 at exec.c:5104
    frame #106: 0x000000010f796ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50486980, eparams=0x00007fff50486630, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #107: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50486980, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #108: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50486980, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #109: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50486980, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #110: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa36397e1b0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #111: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa36397e1b0, wrap=0x0000000000000000, name="__zcmdr-usetty-wrapper") + 575 at exec.c:5567
    frame #112: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c498f0, doshargs=0x000000010fbda558, noreturnval=0) + 2049 at exec.c:5432
    frame #113: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c498f0, args=0x000000010fbda558) + 541 at exec.c:5058
    frame #114: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50487790, eparams=0x00007fff50487440, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #115: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50487790, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #116: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50487790, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #117: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50487790, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #118: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x000000010fbda4e8, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #119: 0x000000010f781fef zsh-5.2-dev-2`eval(argv=0x00007fff504878b0) + 495 at builtin.c:5568
    frame #120: 0x000000010f7787f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-usetty-wrapper", argv=0x00007fff504878b0, ops=0x00007fff50487ba8, func=0) + 32 at builtin.c:5754
    frame #121: 0x000000010f778646 zsh-5.2-dev-2`eval_autoload(shf=0x00007fa360c498f0, name="__zcmdr-usetty-wrapper", ops=0x00007fff50487ba8, func=0) + 198 at builtin.c:2914
    frame #122: 0x000000010f77617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010fbda3f8, ops=0x00007fff50487ba8, func=0) + 4494 at builtin.c:3194
    frame #123: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbda370, assigns=0x0000000000000000, bn=0x000000010f838130) + 3238 at builtin.c:484
    frame #124: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff504886f0, eparams=0x00007fff504883a0, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #125: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff504886f0, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #126: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff504886f0, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #127: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff504886f0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #128: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360c498b0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #129: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360c498b0, wrap=0x0000000000000000, name="__zcmdr-usetty-wrapper") + 575 at exec.c:5567
    frame #130: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c498f0, doshargs=0x000000010fbd5018, noreturnval=0) + 2049 at exec.c:5432
    frame #131: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c498f0, args=0x000000010fbd5018) + 541 at exec.c:5058
    frame #132: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50489fe0, eparams=0x00007fff504891b0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #133: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50489fe0, pcode=43651, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #134: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50489fe0, slcode=7170, how=2, last1=0) + 1008 at exec.c:1567
    frame #135: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50489fe0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #136: 0x000000010f7c995e zsh-5.2-dev-2`execwhile(state=0x00007fff50489fe0, do_exec=0) + 510 at loop.c:454
    frame #137: 0x000000010f796ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50489fe0, eparams=0x00007fff50489c90, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #138: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50489fe0, pcode=24323, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #139: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50489fe0, slcode=1610754, how=2, last1=0) + 1008 at exec.c:1567
    frame #140: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50489fe0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #141: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa363a92b50, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #142: 0x000000010f792794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff5048ab00, do_exec=0) + 196 at exec.c:5104
    frame #143: 0x000000010f796ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5048ab00, eparams=0x00007fff5048a7b0, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #144: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5048ab00, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #145: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5048ab00, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #146: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5048ab00, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #147: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa36396bbd0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #148: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa36396bbd0, wrap=0x0000000000000000, name="uizcm") + 575 at exec.c:5567
    frame #149: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c3dd50, doshargs=0x000000010fbca4c8, noreturnval=0) + 2049 at exec.c:5432
    frame #150: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360c3dd50, args=0x000000010fbca4c8) + 541 at exec.c:5058
    frame #151: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5048b910, eparams=0x00007fff5048b5c0, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #152: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5048b910, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #153: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5048b910, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #154: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5048b910, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #155: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x000000010fbca468, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #156: 0x000000010f781fef zsh-5.2-dev-2`eval(argv=0x00007fff5048ba30) + 495 at builtin.c:5568
    frame #157: 0x000000010f7787f0 zsh-5.2-dev-2`bin_eval(nam="uizcm", argv=0x00007fff5048ba30, ops=0x00007fff5048bd28, func=0) + 32 at builtin.c:5754
    frame #158: 0x000000010f778646 zsh-5.2-dev-2`eval_autoload(shf=0x00007fa360c3dd50, name="uizcm", ops=0x00007fff5048bd28, func=0) + 198 at builtin.c:2914
    frame #159: 0x000000010f77617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010fbca3a8, ops=0x00007fff5048bd28, func=0) + 4494 at builtin.c:3194
    frame #160: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbca320, assigns=0x0000000000000000, bn=0x000000010f838130) + 3238 at builtin.c:484
    frame #161: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5048c870, eparams=0x00007fff5048c520, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #162: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5048c870, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #163: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5048c870, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #164: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5048c870, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #165: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360c49930, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #166: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360c49930, wrap=0x0000000000000000, name="uizcm") + 575 at exec.c:5567
    frame #167: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360c3dd50, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #168: 0x000000010fab5091 zle.so`execzlefunc(func=0x00007fa360e56bf0, args=0x000000010fbc6190, set_bindk=0) + 1601 at zle_main.c:1467
    frame #169: 0x000000010faca436 zle.so`bin_zle_call(name="zle", args=0x000000010fbc6190, ops=0x00007fff5048ce88, func='\0') + 1126 at zle_thingy.c:763
    frame #170: 0x000000010fac8c66 zle.so`bin_zle(name="zle", args=0x000000010fbc6180, ops=0x00007fff5048ce88, func=0) + 438 at zle_thingy.c:388
    frame #171: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbc60c8, assigns=0x0000000000000000, bn=0x000000010faea980) + 3238 at builtin.c:484
    frame #172: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5048d9d0, eparams=0x00007fff5048d680, input=0, output=0, how=2, last1=2) + 18673 at exec.c:3826
    frame #173: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5048d9d0, pcode=195, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #174: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5048d9d0, slcode=5154, how=2, last1=0) + 1008 at exec.c:1567
    frame #175: 0x000000010f78ada1 zsh-5.2-dev-2`execlist(state=0x00007fff5048d9d0, dont_change_job=1, exiting=0) + 1729 at exec.c:1334
    frame #176: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360d1f970, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #177: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360d1f970, wrap=0x0000000000000000, name="_zsh_highlight_call_widget") + 575 at exec.c:5567
    frame #178: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360d1fa00, doshargs=0x000000010fbc2100, noreturnval=0) + 2049 at exec.c:5432
    frame #179: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360d1fa00, args=0x000000010fbc2100) + 541 at exec.c:5058
    frame #180: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5048e7e0, eparams=0x00007fff5048e490, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #181: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff5048e7e0, pcode=67, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #182: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5048e7e0, slcode=6146, how=18, last1=0) + 1008 at exec.c:1567
    frame #183: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5048e7e0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #184: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360e56c20, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #185: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360e56c20, wrap=0x0000000000000000, name="_zsh_highlight_widget_orig-s0.0000060000-r4614-uizcm") + 575 at exec.c:5567
    frame #186: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360e56b40, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #187: 0x000000010fab5091 zle.so`execzlefunc(func=0x00007fa363962650, args=0x000000010fbbe6b0, set_bindk=0) + 1601 at zle_main.c:1467
    frame #188: 0x000000010faca436 zle.so`bin_zle_call(name="zle", args=0x000000010fbbe6b0, ops=0x00007fff5048edf8, func='\0') + 1126 at zle_thingy.c:763
    frame #189: 0x000000010fac8c66 zle.so`bin_zle(name="zle", args=0x000000010fbbe6a0, ops=0x00007fff5048edf8, func=0) + 438 at zle_thingy.c:388
    frame #190: 0x000000010f76de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010fbbe5d8, assigns=0x0000000000000000, bn=0x000000010faea980) + 3238 at builtin.c:484
    frame #191: 0x000000010f797841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50490420, eparams=0x00007fff5048f5f0, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #192: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50490420, pcode=643, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #193: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50490420, slcode=6146, how=18, last1=0) + 1008 at exec.c:1567
    frame #194: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50490420, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #195: 0x000000010f7c9e49 zsh-5.2-dev-2`execif(state=0x00007fff50490420, do_exec=0) + 521 at loop.c:569
    frame #196: 0x000000010f796ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50490420, eparams=0x00007fff504900d0, input=0, output=0, how=18, last1=2) + 16272 at exec.c:3652
    frame #197: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50490420, pcode=579, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #198: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50490420, slcode=18434, how=18, last1=0) + 1008 at exec.c:1567
    frame #199: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50490420, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #200: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360e466d0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #201: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360e466d0, wrap=0x0000000000000000, name="_zsh_autosuggest_invoke_original_widget") + 575 at exec.c:5567
    frame #202: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360e46710, doshargs=0x000000010fbb21b0, noreturnval=0) + 2049 at exec.c:5432
    frame #203: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360e46710, args=0x000000010fbb21b0) + 541 at exec.c:5058
    frame #204: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50491230, eparams=0x00007fff50490ee0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #205: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50491230, pcode=515, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #206: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50491230, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #207: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50491230, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #208: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360e223b0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #209: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360e223b0, wrap=0x0000000000000000, name="_zsh_autosuggest_modify") + 575 at exec.c:5567
    frame #210: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360e223f0, doshargs=0x000000010fb821d0, noreturnval=0) + 2049 at exec.c:5432
    frame #211: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360e223f0, args=0x000000010fb821d0) + 541 at exec.c:5058
    frame #212: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50492040, eparams=0x00007fff50491cf0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #213: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50492040, pcode=387, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #214: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50492040, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #215: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50492040, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #216: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa360e2b770, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #217: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa360e2b770, wrap=0x0000000000000000, name="_zsh_autosuggest_widget_modify") + 575 at exec.c:5567
    frame #218: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa360e2b7b0, doshargs=0x000000010fb75088, noreturnval=0) + 2049 at exec.c:5432
    frame #219: 0x000000010f7920fd zsh-5.2-dev-2`execshfunc(shf=0x00007fa360e2b7b0, args=0x000000010fb75088) + 541 at exec.c:5058
    frame #220: 0x000000010f79715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff50492e50, eparams=0x00007fff50492b00, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #221: 0x000000010f792989 zsh-5.2-dev-2`execpline2(state=0x00007fff50492e50, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #222: 0x000000010f78bc90 zsh-5.2-dev-2`execpline(state=0x00007fff50492e50, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #223: 0x000000010f78ad4e zsh-5.2-dev-2`execlist(state=0x00007fff50492e50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #224: 0x000000010f78a6ac zsh-5.2-dev-2`execode(p=0x00007fa36395b950, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #225: 0x000000010f7909af zsh-5.2-dev-2`runshfunc(prog=0x00007fa36395b950, wrap=0x0000000000000000, name="_zsh_autosuggest_bound_uizcm") + 575 at exec.c:5567
    frame #226: 0x000000010f7902b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007fa36395b010, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #227: 0x000000010fab5091 zle.so`execzlefunc(func=0x00007fa360e4fec0, args=0x000000010faeaef0, set_bindk=0) + 1601 at zle_main.c:1467
    frame #228: 0x000000010fab5383 zle.so`zlecore + 451 at zle_main.c:1113
    frame #229: 0x000000010fab5d1b zle.so`zleread(lp=0x000000010f841c68, rp=0x000000010f841ca8, flags=3, context=0, init="zle-line-init", finish="zle-line-finish") + 1883 at zle_main.c:1319
    frame #230: 0x000000010fab6b43 zle.so`zle_main_entry(cmd=1, ap=0x00007fff50493800) + 739 at zle_main.c:2030
    frame #231: 0x000000010f7b8257 zsh-5.2-dev-2`zleentry(cmd=1) + 615 at init.c:1536
    frame #232: 0x000000010f7b9a7d zsh-5.2-dev-2`inputline + 509 at input.c:293
    frame #233: 0x000000010f7b9675 zsh-5.2-dev-2`ingetc + 325 at input.c:226
    frame #234: 0x000000010f7ab32d zsh-5.2-dev-2`ihgetc + 13 at hist.c:391
    frame #235: 0x000000010f7c3206 zsh-5.2-dev-2`gettok + 38 at lex.c:611
    frame #236: 0x000000010f7c2f79 zsh-5.2-dev-2`zshlex + 121 at lex.c:275
    frame #237: 0x000000010f7e90c7 zsh-5.2-dev-2`parse_event(endtok=37) + 55 at parse.c:569
    frame #238: 0x000000010f7b4294 zsh-5.2-dev-2`loop(toplevel=1, justonce=0) + 308 at init.c:146
    frame #239: 0x000000010f7b886f zsh-5.2-dev-2`zsh_main(argc=2, argv=0x00007fff50493b78) + 847 at init.c:1692
    frame #240: 0x000000010f76ce92 zsh-5.2-dev-2`main(argc=2, argv=0x00007fff50493b78) + 34 at main.c:93
    frame #241: 0x00007fff8ceb65ad libdyld.dylib`start + 1
    frame #242: 0x00007fff8ceb65ad libdyld.dylib`start + 1
(lldb) p next
(Upat) $0 = 0x000bcfa360ded188
(lldb) p pscan
(Upat) $1 = 0x000bcfa360ded188
(lldb) p exp
(char *) $2 = 0x000000010fc08ad8 "\xffffff88\xffffff84m\xffffff8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh \xffffffe2\xffffff80\xffffff83\xffffffb3 initial commit of skylite21 submission"\x19"

[-- Attachment #3: thetool.png --]
[-- Type: image/png, Size: 119688 bytes --]

[-- Attachment #4: bt_core.90081.txt --]
[-- Type: text/plain, Size: 37217 bytes --]

# lldb /usr/local/bin/zsh-5.2-dev-2 -c /cores/core.90081                                                                        (git)-[master]
(lldb) target create "/usr/local/bin/zsh-5.2-dev-2" --core "/cores/core.90081"
warning: (x86_64) /cores/core.90081 load command 134 LC_SEGMENT_64 has a fileoff + filesize (0x28b73000) that extends beyond the end of the file (0x28b72000), the segment will be truncated to match
warning: (x86_64) /cores/core.90081 load command 135 LC_SEGMENT_64 has a fileoff (0x28b73000) that extends beyond the end of the file (0x28b72000), ignoring this section
Core file '/cores/core.90081' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0x0000, 0x000000010e5d42cb zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", inflags=200, endexp=0x0000000000000000) + 1435 at pattern.c:651, stop reason = signal SIGSTOP
  * frame #0: 0x000000010e5d42cb zsh-5.2-dev-2`patcompile(exp="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", inflags=200, endexp=0x0000000000000000) + 1435 at pattern.c:651
    frame #1: 0x000000010e5833af zsh-5.2-dev-2`compgetmatch(pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", flp=0x00007fff5169a664, replstrp=0x00007fff5169a658) + 127 at glob.c:2612
    frame #2: 0x000000010e5832e1 zsh-5.2-dev-2`getmatch(sp=0x00007fff5169ae40, pat="\x88\x84m\x8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06\"znt-tmux.zsh  � initial commit of skylite21 submission\"\x19", fl=16, n=1, replstr=0x0000000000000000) + 49 at glob.c:2652
    frame #3: 0x000000010e5eee37 zsh-5.2-dev-2`paramsubst(l=0x00007fff5169b188, n=0x00007fff5169b170, str=0x00007fff5169b020, qt=1, pf_flags=4, ret_flags=0x00007fff5169b0dc) + 15527 at subst.c:3033
    frame #4: 0x000000010e5e8475 zsh-5.2-dev-2`stringsubst(list=0x00007fff5169b188, node=0x00007fff5169b170, pf_flags=4, ret_flags=0x00007fff5169b0dc, asssub=0) + 1109 at subst.c:247
    frame #5: 0x000000010e5e7a00 zsh-5.2-dev-2`prefork(list=0x00007fff5169b188, flags=6, ret_flags=0x00007fff5169b0dc) + 256 at subst.c:85
    frame #6: 0x000000010e57119e zsh-5.2-dev-2`addvars(state=0x00007fff5169bf40, pc=0x00007f93230620c0, addflags=0) + 606 at exec.c:2380
    frame #7: 0x000000010e56b69d zsh-5.2-dev-2`execsimple(state=0x00007fff5169bf40) + 317 at exec.c:1155
    frame #8: 0x000000010e56ab28 zsh-5.2-dev-2`execlist(state=0x00007fff5169bf40, dont_change_job=1, exiting=0) + 1096 at exec.c:1293
    frame #9: 0x000000010e5a8b14 zsh-5.2-dev-2`execfor(state=0x00007fff5169bf40, do_exec=0) + 1716 at loop.c:175
    frame #10: 0x000000010e576ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169bf40, eparams=0x00007fff5169bbf0, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #11: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169bf40, pcode=2947, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #12: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169bf40, slcode=106498, how=2, last1=0) + 1008 at exec.c:1567
    frame #13: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169bf40, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #14: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324b40000, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #15: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324b40000, wrap=0x0000000000000000, name="__zcmdr-process-buffer") + 575 at exec.c:5567
    frame #16: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22a20, doshargs=0x000000010e9dcb70, noreturnval=0) + 2049 at exec.c:5432
    frame #17: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22a20, args=0x000000010e9dcb70) + 541 at exec.c:5058
    frame #18: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169cd50, eparams=0x00007fff5169ca00, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #19: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169cd50, pcode=1347, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #20: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169cd50, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #21: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169cd50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #22: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324980eb0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #23: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324980eb0, wrap=0x0000000000000000, name="-zcmdrlist_mark_current_segment_in_current_element") + 575 at exec.c:5567
    frame #24: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f93249819f0, doshargs=0x000000010ea032e0, noreturnval=0) + 2049 at exec.c:5432
    frame #25: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f93249819f0, args=0x000000010ea032e0) + 541 at exec.c:5058
    frame #26: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169f120, eparams=0x00007fff5169d810, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #27: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169f120, pcode=32131, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #28: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169f120, slcode=3074, how=2, last1=0) + 1008 at exec.c:1567
    frame #29: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #30: 0x000000010e5a9e49 zsh-5.2-dev-2`execif(state=0x00007fff5169f120, do_exec=0) + 521 at loop.c:569
    frame #31: 0x000000010e576ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169f120, eparams=0x00007fff5169e2f0, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #32: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169f120, pcode=22147, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #33: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169f120, slcode=669698, how=2, last1=0) + 1008 at exec.c:1567
    frame #34: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #35: 0x000000010e5a995e zsh-5.2-dev-2`execwhile(state=0x00007fff5169f120, do_exec=0) + 510 at loop.c:454
    frame #36: 0x000000010e576ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169f120, eparams=0x00007fff5169edd0, input=0, output=0, how=18, last1=2) + 16272 at exec.c:3652
    frame #37: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169f120, pcode=22019, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #38: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169f120, slcode=1959938, how=18, last1=0) + 1008 at exec.c:1567
    frame #39: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169f120, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #40: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321c4fcb0, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #41: 0x000000010e572794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff5169fc40, do_exec=0) + 196 at exec.c:5104
    frame #42: 0x000000010e576ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff5169fc40, eparams=0x00007fff5169f8f0, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #43: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff5169fc40, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #44: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff5169fc40, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #45: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff5169fc40, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #46: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324b534d0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #47: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324b534d0, wrap=0x0000000000000000, name="__zcmdr-list") + 575 at exec.c:5567
    frame #48: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d23410, doshargs=0x000000010e9d4528, noreturnval=0) + 2049 at exec.c:5432
    frame #49: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d23410, args=0x000000010e9d4528) + 541 at exec.c:5058
    frame #50: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a0a50, eparams=0x00007fff516a0700, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #51: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a0a50, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #52: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a0a50, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #53: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a0a50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #54: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x000000010e9d44c0, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #55: 0x000000010e561fef zsh-5.2-dev-2`eval(argv=0x00007fff516a0b70) + 495 at builtin.c:5568
    frame #56: 0x000000010e5587f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-list", argv=0x00007fff516a0b70, ops=0x00007fff516a0e68, func=0) + 32 at builtin.c:5754
    frame #57: 0x000000010e558646 zsh-5.2-dev-2`eval_autoload(shf=0x00007f9321d23410, name="__zcmdr-list", ops=0x00007fff516a0e68, func=0) + 198 at builtin.c:2914
    frame #58: 0x000000010e55617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010e9d43e8, ops=0x00007fff516a0e68, func=0) + 4494 at builtin.c:3194
    frame #59: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e9d4360, assigns=0x0000000000000000, bn=0x000000010e618130) + 3238 at builtin.c:484
    frame #60: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a19b0, eparams=0x00007fff516a1660, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #61: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a19b0, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #62: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a19b0, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #63: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a19b0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #64: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d23240, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #65: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d23240, wrap=0x0000000000000000, name="__zcmdr-list") + 575 at exec.c:5567
    frame #66: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d23410, doshargs=0x000000010e9d0c68, noreturnval=0) + 2049 at exec.c:5432
    frame #67: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d23410, args=0x000000010e9d0c68) + 541 at exec.c:5058
    frame #68: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a27c0, eparams=0x00007fff516a2470, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #69: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a27c0, pcode=4675, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #70: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a27c0, slcode=12290, how=2, last1=0) + 1008 at exec.c:1567
    frame #71: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a27c0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #72: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324a31fb0, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #73: 0x000000010e572794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff516a32e0, do_exec=0) + 196 at exec.c:5104
    frame #74: 0x000000010e576ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a32e0, eparams=0x00007fff516a2f90, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #75: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a32e0, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #76: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a32e0, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #77: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a32e0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #78: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324b34b90, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #79: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324b34b90, wrap=0x0000000000000000, name="__zcmdr-list-wrapper") + 575 at exec.c:5567
    frame #80: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22b00, doshargs=0x000000010e9cc558, noreturnval=0) + 2049 at exec.c:5432
    frame #81: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22b00, args=0x000000010e9cc558) + 541 at exec.c:5058
    frame #82: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a40f0, eparams=0x00007fff516a3da0, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #83: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a40f0, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #84: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a40f0, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #85: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a40f0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #86: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x000000010e9cc4e8, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #87: 0x000000010e561fef zsh-5.2-dev-2`eval(argv=0x00007fff516a4210) + 495 at builtin.c:5568
    frame #88: 0x000000010e5587f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-list-wrapper", argv=0x00007fff516a4210, ops=0x00007fff516a4508, func=0) + 32 at builtin.c:5754
    frame #89: 0x000000010e558646 zsh-5.2-dev-2`eval_autoload(shf=0x00007f9321d22b00, name="__zcmdr-list-wrapper", ops=0x00007fff516a4508, func=0) + 198 at builtin.c:2914
    frame #90: 0x000000010e55617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010e9cc3f8, ops=0x00007fff516a4508, func=0) + 4494 at builtin.c:3194
    frame #91: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e9cc370, assigns=0x0000000000000000, bn=0x000000010e618130) + 3238 at builtin.c:484
    frame #92: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a5050, eparams=0x00007fff516a4d00, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #93: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a5050, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #94: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a5050, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #95: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a5050, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #96: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d22ac0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #97: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d22ac0, wrap=0x0000000000000000, name="__zcmdr-list-wrapper") + 575 at exec.c:5567
    frame #98: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22b00, doshargs=0x000000010e9be6f0, noreturnval=0) + 2049 at exec.c:5432
    frame #99: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22b00, args=0x000000010e9be6f0) + 541 at exec.c:5058
    frame #100: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a5e60, eparams=0x00007fff516a5b10, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #101: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a5e60, pcode=2243, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #102: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a5e60, slcode=3074, how=2, last1=0) + 1008 at exec.c:1567
    frame #103: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a5e60, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #104: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d5cc10, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #105: 0x000000010e572794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff516a6980, do_exec=0) + 196 at exec.c:5104
    frame #106: 0x000000010e576ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a6980, eparams=0x00007fff516a6630, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #107: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a6980, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #108: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a6980, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #109: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a6980, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #110: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324a34780, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #111: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324a34780, wrap=0x0000000000000000, name="__zcmdr-usetty-wrapper") + 575 at exec.c:5567
    frame #112: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22800, doshargs=0x000000010e9ba558, noreturnval=0) + 2049 at exec.c:5432
    frame #113: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22800, args=0x000000010e9ba558) + 541 at exec.c:5058
    frame #114: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a7790, eparams=0x00007fff516a7440, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #115: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a7790, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #116: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a7790, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #117: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a7790, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #118: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x000000010e9ba4e8, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #119: 0x000000010e561fef zsh-5.2-dev-2`eval(argv=0x00007fff516a78b0) + 495 at builtin.c:5568
    frame #120: 0x000000010e5587f0 zsh-5.2-dev-2`bin_eval(nam="__zcmdr-usetty-wrapper", argv=0x00007fff516a78b0, ops=0x00007fff516a7ba8, func=0) + 32 at builtin.c:5754
    frame #121: 0x000000010e558646 zsh-5.2-dev-2`eval_autoload(shf=0x00007f9321d22800, name="__zcmdr-usetty-wrapper", ops=0x00007fff516a7ba8, func=0) + 198 at builtin.c:2914
    frame #122: 0x000000010e55617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010e9ba3f8, ops=0x00007fff516a7ba8, func=0) + 4494 at builtin.c:3194
    frame #123: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e9ba370, assigns=0x0000000000000000, bn=0x000000010e618130) + 3238 at builtin.c:484
    frame #124: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a86f0, eparams=0x00007fff516a83a0, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #125: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a86f0, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #126: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a86f0, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #127: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a86f0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #128: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d227c0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #129: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d227c0, wrap=0x0000000000000000, name="__zcmdr-usetty-wrapper") + 575 at exec.c:5567
    frame #130: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d22800, doshargs=0x000000010e9b5000, noreturnval=0) + 2049 at exec.c:5432
    frame #131: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d22800, args=0x000000010e9b5000) + 541 at exec.c:5058
    frame #132: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a9fe0, eparams=0x00007fff516a91b0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #133: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a9fe0, pcode=43651, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #134: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a9fe0, slcode=7170, how=2, last1=0) + 1008 at exec.c:1567
    frame #135: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a9fe0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #136: 0x000000010e5a995e zsh-5.2-dev-2`execwhile(state=0x00007fff516a9fe0, do_exec=0) + 510 at loop.c:454
    frame #137: 0x000000010e576ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516a9fe0, eparams=0x00007fff516a9c90, input=0, output=0, how=2, last1=2) + 16272 at exec.c:3652
    frame #138: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516a9fe0, pcode=24323, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #139: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516a9fe0, slcode=1610754, how=2, last1=0) + 1008 at exec.c:1567
    frame #140: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516a9fe0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #141: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324a2da70, dont_change_job=1, exiting=0, context="loadautofunc") + 284 at exec.c:1112
    frame #142: 0x000000010e572794 zsh-5.2-dev-2`execautofn_basic(state=0x00007fff516aab00, do_exec=0) + 196 at exec.c:5104
    frame #143: 0x000000010e576ea8 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516aab00, eparams=0x00007fff516aa7b0, input=0, output=0, how=18, last1=2) + 16216 at exec.c:3650
    frame #144: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516aab00, pcode=3, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #145: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516aab00, slcode=3074, how=18, last1=0) + 1008 at exec.c:1567
    frame #146: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516aab00, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #147: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f932498be40, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #148: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f932498be40, wrap=0x0000000000000000, name="uizcm") + 575 at exec.c:5567
    frame #149: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d241e0, doshargs=0x000000010e9aa4c8, noreturnval=0) + 2049 at exec.c:5432
    frame #150: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d241e0, args=0x000000010e9aa4c8) + 541 at exec.c:5058
    frame #151: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516ab910, eparams=0x00007fff516ab5c0, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #152: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516ab910, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #153: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516ab910, slcode=4098, how=18, last1=0) + 1008 at exec.c:1567
    frame #154: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516ab910, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #155: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x000000010e9aa468, dont_change_job=1, exiting=0, context="eval") + 284 at exec.c:1112
    frame #156: 0x000000010e561fef zsh-5.2-dev-2`eval(argv=0x00007fff516aba30) + 495 at builtin.c:5568
    frame #157: 0x000000010e5587f0 zsh-5.2-dev-2`bin_eval(nam="uizcm", argv=0x00007fff516aba30, ops=0x00007fff516abd28, func=0) + 32 at builtin.c:5754
    frame #158: 0x000000010e558646 zsh-5.2-dev-2`eval_autoload(shf=0x00007f9321d241e0, name="uizcm", ops=0x00007fff516abd28, func=0) + 198 at builtin.c:2914
    frame #159: 0x000000010e55617e zsh-5.2-dev-2`bin_functions(name="autoload", argv=0x000000010e9aa3a8, ops=0x00007fff516abd28, func=0) + 4494 at builtin.c:3194
    frame #160: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e9aa320, assigns=0x0000000000000000, bn=0x000000010e618130) + 3238 at builtin.c:484
    frame #161: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516ac870, eparams=0x00007fff516ac520, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #162: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516ac870, pcode=195, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #163: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516ac870, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #164: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516ac870, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #165: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d241a0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #166: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d241a0, wrap=0x0000000000000000, name="uizcm") + 575 at exec.c:5567
    frame #167: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d241e0, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #168: 0x000000010e895091 zle.so`execzlefunc(func=0x00007f9321d60c90, args=0x000000010e9a6198, set_bindk=0) + 1601 at zle_main.c:1467
    frame #169: 0x000000010e8aa436 zle.so`bin_zle_call(name="zle", args=0x000000010e9a6198, ops=0x00007fff516ace88, func='\0') + 1126 at zle_thingy.c:763
    frame #170: 0x000000010e8a8c66 zle.so`bin_zle(name="zle", args=0x000000010e9a6188, ops=0x00007fff516ace88, func=0) + 438 at zle_thingy.c:388
    frame #171: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e9a60c8, assigns=0x0000000000000000, bn=0x000000010e8ca980) + 3238 at builtin.c:484
    frame #172: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516ad9d0, eparams=0x00007fff516ad680, input=0, output=0, how=2, last1=2) + 18673 at exec.c:3826
    frame #173: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516ad9d0, pcode=195, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #174: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516ad9d0, slcode=5154, how=2, last1=0) + 1008 at exec.c:1567
    frame #175: 0x000000010e56ada1 zsh-5.2-dev-2`execlist(state=0x00007fff516ad9d0, dont_change_job=1, exiting=0) + 1729 at exec.c:1334
    frame #176: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321f0bcc0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #177: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321f0bcc0, wrap=0x0000000000000000, name="_zsh_highlight_call_widget") + 575 at exec.c:5567
    frame #178: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321f0bd80, doshargs=0x000000010e9a2100, noreturnval=0) + 2049 at exec.c:5432
    frame #179: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321f0bd80, args=0x000000010e9a2100) + 541 at exec.c:5058
    frame #180: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516ae7e0, eparams=0x00007fff516ae490, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #181: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516ae7e0, pcode=67, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #182: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516ae7e0, slcode=6146, how=18, last1=0) + 1008 at exec.c:1567
    frame #183: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516ae7e0, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #184: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d60cc0, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #185: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d60cc0, wrap=0x0000000000000000, name="_zsh_highlight_widget_orig-s0.0000110000-r25146-uizcm") + 575 at exec.c:5567
    frame #186: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d621d0, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #187: 0x000000010e895091 zle.so`execzlefunc(func=0x00007f9321c57560, args=0x000000010e99e6b0, set_bindk=0) + 1601 at zle_main.c:1467
    frame #188: 0x000000010e8aa436 zle.so`bin_zle_call(name="zle", args=0x000000010e99e6b0, ops=0x00007fff516aedf8, func='\0') + 1126 at zle_thingy.c:763
    frame #189: 0x000000010e8a8c66 zle.so`bin_zle(name="zle", args=0x000000010e99e6a0, ops=0x00007fff516aedf8, func=0) + 438 at zle_thingy.c:388
    frame #190: 0x000000010e54de06 zsh-5.2-dev-2`execbuiltin(args=0x000000010e99e5d8, assigns=0x0000000000000000, bn=0x000000010e8ca980) + 3238 at builtin.c:484
    frame #191: 0x000000010e577841 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516b0420, eparams=0x00007fff516af5f0, input=0, output=0, how=18, last1=2) + 18673 at exec.c:3826
    frame #192: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516b0420, pcode=643, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #193: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516b0420, slcode=6146, how=18, last1=0) + 1008 at exec.c:1567
    frame #194: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516b0420, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #195: 0x000000010e5a9e49 zsh-5.2-dev-2`execif(state=0x00007fff516b0420, do_exec=0) + 521 at loop.c:569
    frame #196: 0x000000010e576ee0 zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516b0420, eparams=0x00007fff516b00d0, input=0, output=0, how=18, last1=2) + 16272 at exec.c:3652
    frame #197: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516b0420, pcode=579, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #198: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516b0420, slcode=18434, how=18, last1=0) + 1008 at exec.c:1567
    frame #199: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516b0420, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #200: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d5ab90, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #201: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d5ab90, wrap=0x0000000000000000, name="_zsh_autosuggest_invoke_original_widget") + 575 at exec.c:5567
    frame #202: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d5bd90, doshargs=0x000000010e9921b0, noreturnval=0) + 2049 at exec.c:5432
    frame #203: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d5bd90, args=0x000000010e9921b0) + 541 at exec.c:5058
    frame #204: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516b1230, eparams=0x00007fff516b0ee0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #205: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516b1230, pcode=515, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #206: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516b1230, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #207: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516b1230, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #208: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321d20a00, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #209: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321d20a00, wrap=0x0000000000000000, name="_zsh_autosuggest_modify") + 575 at exec.c:5567
    frame #210: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321d20c60, doshargs=0x000000010e9621d0, noreturnval=0) + 2049 at exec.c:5432
    frame #211: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321d20c60, args=0x000000010e9621d0) + 541 at exec.c:5058
    frame #212: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516b2040, eparams=0x00007fff516b1cf0, input=0, output=0, how=2, last1=2) + 16906 at exec.c:3704
    frame #213: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516b2040, pcode=387, how=2, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #214: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516b2040, slcode=4098, how=2, last1=0) + 1008 at exec.c:1567
    frame #215: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516b2040, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #216: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9321e07530, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #217: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9321e07530, wrap=0x0000000000000000, name="_zsh_autosuggest_widget_modify") + 575 at exec.c:5567
    frame #218: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9321e07680, doshargs=0x000000010e955088, noreturnval=0) + 2049 at exec.c:5432
    frame #219: 0x000000010e5720fd zsh-5.2-dev-2`execshfunc(shf=0x00007f9321e07680, args=0x000000010e955088) + 541 at exec.c:5058
    frame #220: 0x000000010e57715a zsh-5.2-dev-2`execcmd_exec(state=0x00007fff516b2e50, eparams=0x00007fff516b2b00, input=0, output=0, how=18, last1=2) + 16906 at exec.c:3704
    frame #221: 0x000000010e572989 zsh-5.2-dev-2`execpline2(state=0x00007fff516b2e50, pcode=131, how=18, input=0, output=0, last1=0) + 441 at exec.c:1837
    frame #222: 0x000000010e56bc90 zsh-5.2-dev-2`execpline(state=0x00007fff516b2e50, slcode=5122, how=18, last1=0) + 1008 at exec.c:1567
    frame #223: 0x000000010e56ad4e zsh-5.2-dev-2`execlist(state=0x00007fff516b2e50, dont_change_job=1, exiting=0) + 1646 at exec.c:1325
    frame #224: 0x000000010e56a6ac zsh-5.2-dev-2`execode(p=0x00007f9324b46c80, dont_change_job=1, exiting=0, context="shfunc") + 284 at exec.c:1112
    frame #225: 0x000000010e5709af zsh-5.2-dev-2`runshfunc(prog=0x00007f9324b46c80, wrap=0x0000000000000000, name="_zsh_autosuggest_bound_uizcm") + 575 at exec.c:5567
    frame #226: 0x000000010e5702b1 zsh-5.2-dev-2`doshfunc(shfunc=0x00007f9324b46d20, doshargs=0x0000000000000000, noreturnval=1) + 2049 at exec.c:5432
    frame #227: 0x000000010e895091 zle.so`execzlefunc(func=0x00007f9321d22470, args=0x000000010e8caef0, set_bindk=0) + 1601 at zle_main.c:1467
    frame #228: 0x000000010e895383 zle.so`zlecore + 451 at zle_main.c:1113
    frame #229: 0x000000010e895d1b zle.so`zleread(lp=0x000000010e621c68, rp=0x000000010e621ca8, flags=3, context=0, init="zle-line-init", finish="zle-line-finish") + 1883 at zle_main.c:1319
    frame #230: 0x000000010e896b43 zle.so`zle_main_entry(cmd=1, ap=0x00007fff516b3800) + 739 at zle_main.c:2030
    frame #231: 0x000000010e598257 zsh-5.2-dev-2`zleentry(cmd=1) + 615 at init.c:1536
    frame #232: 0x000000010e599a7d zsh-5.2-dev-2`inputline + 509 at input.c:293
    frame #233: 0x000000010e599675 zsh-5.2-dev-2`ingetc + 325 at input.c:226
    frame #234: 0x000000010e58b32d zsh-5.2-dev-2`ihgetc + 13 at hist.c:391
    frame #235: 0x000000010e5a3206 zsh-5.2-dev-2`gettok + 38 at lex.c:611
    frame #236: 0x000000010e5a2f79 zsh-5.2-dev-2`zshlex + 121 at lex.c:275
    frame #237: 0x000000010e5c90c7 zsh-5.2-dev-2`parse_event(endtok=37) + 55 at parse.c:569
    frame #238: 0x000000010e594294 zsh-5.2-dev-2`loop(toplevel=1, justonce=0) + 308 at init.c:146
    frame #239: 0x000000010e59886f zsh-5.2-dev-2`zsh_main(argc=2, argv=0x00007fff516b3b78) + 847 at init.c:1692
    frame #240: 0x000000010e54ce92 zsh-5.2-dev-2`main(argc=2, argv=0x00007fff516b3b78) + 34 at main.c:93
    frame #241: 0x00007fff8ceb65ad libdyld.dylib`start + 1
    frame #242: 0x00007fff8ceb65ad libdyld.dylib`start + 1

(lldb) p next
(Upat) $0 = 0x0000ff9324b59968
(lldb) p pscan
(Upat) $1 = 0x0000ff9324b59968
(lldb) p exp
(char *) $2 = 0x000000010e9e8ad8 "\xffffff88\xffffff84m\xffffff8a\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh \xffffffe2\xffffff80\xffffff83\xffffffb3 initial commit of skylite21 submission"\x19"


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-09  9:00 Cores almost on demand in patcompile() Sebastian Gniazdowski
@ 2016-10-09  9:16 ` Sebastian Gniazdowski
  2016-10-09 10:15   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-09  9:16 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Bart Schaefer, Peter Stephenson

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

PS. Last runshfunc() uses this file:

https://github.com/psprint/zcommodore/blob/master/__zcmdr-process-buffer

I've added debug marks to this file – attached is diff where I've
added them. The resulted debug-prints file contains also the text
processed, with the  ^A, ^B, etc. – this is what patcompile() is feed
with. Mark 8 is the last one generated before core, and points to this
lines as the source of core-triggering patcompile():

    # Remove the word
    MATCH=""
    buf="${buf#(#m)$word}"


Best regards,
Sebastian Gniazdowski

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: final_marks.txt --]
[-- Type: text/plain; charset=US-ASCII; name="final_marks.txt", Size: 7654 bytes --]

Mark 1
Mark 2
Mark 3
Mark 5
Mark 6
Mark 7 [\x01zcmdr_checkbox_1\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x01/Mark\ for\ feature/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x014\x02[_]]
Mark 8 [\x01zcmdr_checkbox_1\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x01/Mark\ for\ feature/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x014\x02[_] \x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x038fda582\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x038fda582\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x038fda582\x19]
Mark 8 [\x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x038fda582\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19]
Mark 8 [\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x06"Updated README.md"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19]
Mark 8 [\x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x018fda582ec5fd98c00e8178613810dc239ba6cb7f\x02\x05((3 days ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 8 [\x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 []
Mark 10
Mark 11
Mark 12
Mark 13
Mark 14
Mark 15
Mark 1
Mark 2
Mark 3
Mark 5
Mark 6
Mark 7 [\x01zcmdr_checkbox_1\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x01/Mark\ for\ feature/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x013\x02[_]]
Mark 8 [\x01zcmdr_checkbox_1\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x01/Mark\ for\ feature/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x013\x02[_] \x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x030a87c80\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((70 minutes ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x030a87c80\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((70 minutes ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x030a87c80\x19]
Mark 8 [\x01glogA\x010\x01/Open\ commit/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x030a87c80\x19 \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((70 minutes ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 9 [ \x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((70 minutes ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]
Mark 10
Mark 11
Mark 7 [\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19]
Mark 8 [\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh – initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((70 minutes ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`]

HERE CORE DUMP STARTED TO BE GENERATED

[-- Attachment #3: process-buffer.diff.txt --]
[-- Type: text/plain, Size: 3158 bytes --]

diff --git a/__zcmdr-process-buffer b/__zcmdr-process-buffer
index 61592b3..3107e8b 100644
--- a/__zcmdr-process-buffer
+++ b/__zcmdr-process-buffer
@@ -14,24 +14,30 @@
 emulate -LR zsh
 setopt typesetsilent extendedglob noshortloops
 
+echo "Mark 1" >> /tmp/reply
 local MBEGIN MEND MATCH mbegin mend match
 
 local buf="${1:-$BUFFER}"
 local cursor="${2:-$CURSOR}"
 
+echo "Mark 2" >> /tmp/reply
 ZCMDR_PB_WORDS=( "${(Z+n+)buf}" )
 ZCMDR_PB_SPACES=( )
 ZCMDR_PB_WORDS_BEGINNINGS=( )
 ZCMDR_PB_SELECTED_WORD="-1"
+echo "Mark 3" >> /tmp/reply
 
 # (Z+n+) will return 1 element for buf that is empty or only whitespace
 if [[ "$buf" = ( |$'\t')# ]]; then
     ZCMDR_PB_WORDS=( )
     integer nwords=0
+    echo "Mark 4" >> /tmp/reply
 else
     integer nwords="${#ZCMDR_PB_WORDS}"
+    echo "Mark 5" >> /tmp/reply
 fi
 
+echo "Mark 6" >> /tmp/reply
 # Remove ZCMDR_PB_WORDS one by one, counting characters,
 # computing beginning of each word, to find
 # place to break the word into 2 halves (for
@@ -50,6 +56,7 @@ for (( i=1; i<=nwords; i++ )); do
     ZCMDR_PB_WORDS[i]="${ZCMDR_PB_WORDS[i]%% ##}"
     word="${ZCMDR_PB_WORDS[i]}"
 
+    echo "Mark 7 [${ZCMDR_PB_WORDS[i]}]" >> /tmp/reply
     # In general, $buf can start with white spaces
     # We will not search for them, but instead for
     # leading character of current shell word,
@@ -58,6 +65,7 @@ for (( i=1; i<=nwords; i++ )); do
 
     # Remove white spaces
     buf="${buf##(#m)[^$word[1]]#}"
+    echo "Mark 8 [$buf]" >> /tmp/reply
     # Count them
     char_count=char_count+"$#MATCH"
     # This is the beginning of current word
@@ -69,6 +77,7 @@ for (( i=1; i<=nwords; i++ )); do
     MATCH=""
     buf="${buf#(#m)$word}"
 
+    echo "Mark 9 [$buf]" >> /tmp/reply
     # If shell word not found, return. This shoudln't happen
     [ -z "$MATCH" ] && return 1
 
@@ -76,25 +85,31 @@ for (( i=1; i<=nwords; i++ )); do
     # Visual cursor right after spaces (-ge) -> not enough to select previous word (-gt required)
     [[ "$ZCMDR_PB_SELECTED_WORD" -eq "-1" && "$char_count" -gt "$cursor" ]] && ZCMDR_PB_SELECTED_WORD=$(( i-1 ))
 
+    echo "Mark 10" >> /tmp/reply
     # Actual characters point to current shell word
     # Visual cursor right after letters (-ge) -> enough to select current word
     char_count=char_count+"$#word"
     [[ "$ZCMDR_PB_SELECTED_WORD" -eq "-1" && "$char_count" -ge "$cursor" ]] && ZCMDR_PB_SELECTED_WORD="$i"
+    echo "Mark 11" >> /tmp/reply
 done 
 
+echo "Mark 12" >> /tmp/reply
 # What's left in $buf can be only white spaces
 char_count=char_count+"$#buf"
 ZCMDR_PB_SPACES[i]="$buf"
 
+echo "Mark 13" >> /tmp/reply
 # Visual cursor right after spaces (-ge) -> enough to select last word
 [[ "$ZCMDR_PB_SELECTED_WORD" -eq "-1" && "$char_count" -ge "$cursor" ]] && ZCMDR_PB_SELECTED_WORD=$(( i-1 ))
 
+echo "Mark 14" >> /tmp/reply
 # Divide active word into two halves
 integer diff=$(( cursor - ZCMDR_PB_WORDS_BEGINNINGS[ZCMDR_PB_SELECTED_WORD] + 1 ))
 word="${ZCMDR_PB_WORDS[ZCMDR_PB_SELECTED_WORD]}"
 ZCMDR_PB_LEFT="${word[1,diff]}"
 ZCMDR_PB_RIGHT="${word[diff+1,-1]}"
 
+echo "Mark 15" >> /tmp/reply
 # This function should be tested
 return 0
 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-09  9:16 ` Sebastian Gniazdowski
@ 2016-10-09 10:15   ` Sebastian Gniazdowski
  2016-10-09 16:09     ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-09 10:15 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Bart Schaefer, Peter Stephenson

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

OK – here's minimal test case. It contains error in first filename,
but the core was triggered anyway, in each run of two that I've done.
Two files, input1.txt, input2.txt, with the problematic strings, then:
    MATCH=""
    buf="${buf#(#m)$word}"

in test.zsh

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: input1.txt --]
[-- Type: text/plain, Size: 442 bytes --]

\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh ā€“ initial commit of skylite21 submission"\x19 \x01glogC\x010\x01/Same-files\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x05((2 hours ago))\x19 \x01glogD\x010\x01/Same-author\ commits/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x01Sebastian\ Gniazdowski\x02`Sebastian Gniazdowski`

[-- Attachment #3: input2.txt --]
[-- Type: text/plain, Size: 169 bytes --]

\x01glogB\x010\x01/Diff/\x01/Users/sgniazdowski/github/zsh-navigation-tools.git\x010a87c8044c1c6677a38ccdabd36334cc2aaab496\x02\x06"znt-tmux.zsh ā€“ initial commit of skylite21 submission"\x19

[-- Attachment #4: test.zsh --]
[-- Type: application/octet-stream, Size: 133 bytes --]

#!/usr/local/bin/zsh-5.2-dev-2

buf="$(<input1.txt0)"
word="$(<input2.txt)"

MATCH=""
buf="${buf#(#m)$word}"

echo "Processed: $buf"

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-09 10:15   ` Sebastian Gniazdowski
@ 2016-10-09 16:09     ` Sebastian Gniazdowski
  2016-10-10 15:31       ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-09 16:09 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Bart Schaefer, Peter Stephenson

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

I have extended_glob set in zshenv. It is needed. However it seems
that the additional ABSD setting (huh I did fork in .zshenv, turns
out) helps to make the core more often. With only extended_glob ~15
runs are needed. I attach complete test.zsh.


ABSD=0
[[ `uname` = "Darwin" ]] && ABSD=1
[[ `uname` = "SunOS" ]] && ABSD=1
setopt extended_glob
...
...

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: test.zsh --]
[-- Type: application/octet-stream, Size: 257 bytes --]

#!/usr/local/bin/zsh-5.2-dev-2 -f

# Check for bsd system
ABSD=0
[[ `uname` = "Darwin" ]] && ABSD=1
[[ `uname` = "SunOS" ]] && ABSD=1
setopt extended_glob

buf="$(<input1.txt0)"
word="$(<input2.txt)"

MATCH=""
buf="${buf#(#m)$word}"

echo "Processed: $buf"

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-09 16:09     ` Sebastian Gniazdowski
@ 2016-10-10 15:31       ` Sebastian Gniazdowski
  2016-10-11  2:46         ` Bart Schaefer
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-10 15:31 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

My new observations:
– ^A, ^B, ^F, ^Y don't have meaning: replacing them with A, B, F, Y
doesn't stop core dump
– the "ndash", .i.e. this char: >>> – <<<, has a role, because
replacing it with other char, also one like §, stops core dump
– length of the string has a role, tired shortening the string on the
left and no core dump then

I attach input2b.txt with no control chars and test2.zsh (zsh -f) that
opens that file

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: input2b.txt --]
[-- Type: text/plain, Size: 169 bytes --]

AglogBA0A/Diff/A/Users/sgniazdowski/github/zsh-navigation-tools.gitA0a87c8044c1c6677a38ccdabd36334cc2aaab496BF"znt-tmux.zsh – initial commit of skylite21 submission"Y

[-- Attachment #3: test2.zsh --]
[-- Type: application/octet-stream, Size: 258 bytes --]

#!/usr/local/bin/zsh-5.2-dev-2 -f

# Check for bsd system
ABSD=0
[[ `uname` = "Darwin" ]] && ABSD=1
[[ `uname` = "SunOS" ]] && ABSD=1
setopt extended_glob

buf="$(<input1.txt0)"
word="$(<input2b.txt)"

MATCH=""
buf="${buf#(#m)$word}"

echo "Processed: $buf"

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-10 15:31       ` Sebastian Gniazdowski
@ 2016-10-11  2:46         ` Bart Schaefer
  2016-10-11  2:53           ` Bart Schaefer
                             ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Bart Schaefer @ 2016-10-11  2:46 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

On Mon, Oct 10, 2016 at 8:31 AM, Sebastian Gniazdowski <
sgniazdowski@gmail.com> wrote:

> My new observations:
> – the "ndash", .i.e. this char: >>> – <<<, has a role, because
> replacing it with other char, also one like §, stops core dump
>

Your stack trace in the first message on this thread has a string as the
"exp" argument of patcompile() that makes me suspicious.  The comments say
that this argument is expected to be metafied (pattern.c 522), but as best
I can tell it's passed down from paramsubst() tokenized but not metafied.
(I don't have access to my usual debugging platform this week.)  One of the
multibyte characters in the string

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-11  2:46         ` Bart Schaefer
@ 2016-10-11  2:53           ` Bart Schaefer
  2016-10-11  6:51           ` type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Daniel Shahaf
  2016-10-13  9:43           ` Cores almost on demand in patcompile() Peter Stephenson
  2 siblings, 0 replies; 30+ messages in thread
From: Bart Schaefer @ 2016-10-11  2:53 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

[Sorry, fat-fingered the send button]

On Mon, Oct 10, 2016 at 7:46 PM, Bart Schaefer <schaefer@brasslantern.com>
wrote:

> On Mon, Oct 10, 2016 at 8:31 AM, Sebastian Gniazdowski <
> sgniazdowski@gmail.com> wrote:
>
>> My new observations:
>> – the "ndash", .i.e. this char: >>> – <<<, has a role, because
>> replacing it with other char, also one like §, stops core dump
>>
>
> Your stack trace in the first message on this thread has a string as the
> "exp" argument of patcompile() that makes me suspicious.  The comments say
> that this argument is expected to be metafied (pattern.c 522), but as best
> I can tell it's passed down from paramsubst() tokenized but not metafied.
> (I don't have access to my usual debugging platform this week.)  One of the
> multibyte characters in the string
>

... in that exp argument, the character in the position where you
identified ndash in input2b.txt, has a byte with hex value 0x83 which would
cause it to be incorrectly interpreted as a metacharacter.  If this is the
case, this probably results in the pattern being mishandled.

There were some changes made a while ago to try to optimize memory
(re)allocation during pattern compilation and globbing.  It's quite
possible that miscounting of the number of characters in the pattern is
causing problems with the allocated buffer.  At this point though, I'm just
speculating.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* type-checking for metafiedness?  (was: Re: Cores almost on demand in patcompile())
  2016-10-11  2:46         ` Bart Schaefer
  2016-10-11  2:53           ` Bart Schaefer
@ 2016-10-11  6:51           ` Daniel Shahaf
  2016-10-13 10:22             ` Peter Stephenson
  2016-10-13  9:43           ` Cores almost on demand in patcompile() Peter Stephenson
  2 siblings, 1 reply; 30+ messages in thread
From: Daniel Shahaf @ 2016-10-11  6:51 UTC (permalink / raw)
  To: Zsh hackers list; +Cc: Sebastian Gniazdowski

Bart Schaefer wrote on Mon, Oct 10, 2016 at 19:46:18 -0700:
> The comments say that this argument is expected to be metafied
> (pattern.c 522), but as best I can tell it's passed down from
> paramsubst() tokenized but not metafied.

Pardon me if this has been discussed before, but why don't we introduce
the type definitions
.
    struct metafied_t { char *v; };
    struct unmetafied_t { char *v; };
.
and start incrementally replacing uses of "char *" with uses of these
types?  This will gain type checking for metafied v. unmetafied strings,
as these two types do not implicitly convert into each other (attempts
to do so generate a compiler warning).

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-11  2:46         ` Bart Schaefer
  2016-10-11  2:53           ` Bart Schaefer
  2016-10-11  6:51           ` type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Daniel Shahaf
@ 2016-10-13  9:43           ` Peter Stephenson
  2016-10-19 11:14             ` Sebastian Gniazdowski
  2 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-13  9:43 UTC (permalink / raw)
  To: Bart Schaefer, Zsh hackers list

On Mon, 10 Oct 2016 19:46:18 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Mon, Oct 10, 2016 at 8:31 AM, Sebastian Gniazdowski <
> sgniazdowski@gmail.com> wrote:
> 
> > My new observations:
> > – the "ndash", .i.e. this char: >>> – <<<, has a role, because
> > replacing it with other char, also one like §, stops core dump
> >
> 
> Your stack trace in the first message on this thread has a string as the
> "exp" argument of patcompile() that makes me suspicious.  The comments say
> that this argument is expected to be metafied (pattern.c 522), but as best
> I can tell it's passed down from paramsubst() tokenized but not metafied.
> (I don't have access to my usual debugging platform this week.)  One of the
> multibyte characters in the string
>...
> in that exp argument, the character in the position where you
> identified ndash in input2b.txt, has a byte with hex value 0x83 which would
> cause it to be incorrectly interpreted as a metacharacter.  If this is the
> case, this probably results in the pattern being mishandled.
> 
> There were some changes made a while ago to try to optimize memory
> (re)allocation during pattern compilation and globbing.  It's quite
> possible that miscounting of the number of characters in the pattern is
> causing problems with the allocated buffer.  At this point though, I'm just
> speculating.

That comes from "s" within paramsubst(), which is just the minimally
modified parameter substitution string from the command line, which
should still be both metafied and containing tokens (the ability to
quote characters that look like tokens being the main use of
metafication).  It's not the value of the parameter, which goes a
different way.  The pattern just gets compiled once.

Here's an xxd of the complete expression from the backtrace --- the
exp=" and the final double quote before the newline are therefore not
part of the string (this is also a bit confusing since I've left in the
\x.. escapes put in by the debugger but they aren't immediately
relevant):

0000000: 6578 703d 225c 7838 385c 7838 346d 5c78  exp="\x88\x84m\x
0000010: 3861 5c78 3031 676c 6f67 425c 7830 3130  8a\x01glogB\x010
0000020: 5c78 3031 2f44 6966 662f 5c78 3031 2f55  \x01/Diff/\x01/U
0000030: 7365 7273 2f73 676e 6961 7a64 6f77 736b  sers/sgniazdowsk
0000040: 692f 6769 7468 7562 2f7a 7368 2d6e 6176  i/github/zsh-nav
0000050: 6967 6174 696f 6e2d 746f 6f6c 732e 6769  igation-tools.gi
0000060: 745c 7830 3130 6138 3763 3830 3434 6331  t\x010a87c8044c1
0000070: 6336 3637 3761 3338 6363 6461 6264 3336  c6677a38ccdabd36
0000080: 3333 3463 6332 6161 6162 3439 365c 7830  334cc2aaab496\x0
0000090: 325c 7830 365c 227a 6e74 2d74 6d75 782e  2\x06\"znt-tmux.
00000a0: 7a73 680a e280 83ef bfbd 2069 6e69 7469  zsh....... initi
00000b0: 616c 2063 6f6d 6d69 7420 6f66 2073 6b79  al commit of sky
00000c0: 6c69 7465 3231 2073 7562 6d69 7373 696f  lite21 submissio
00000d0: 6e5c 225c 7831 3922 0a                   n\"\x19".

The dodgy sequence is around "e2 80 83 ef bf bd" from byte 0xa4.  That
83 is indeed a Meta, and it looks like it's the only one in the input.
Unmetafiying the following ef gives cf, which is not in the range that
would have caused it to be metafied.

So it looks like this did indeed get previously unmetafied when it
shouldn't.  The question is where...  If this is the case, the crash
could be to do with the lack of null determination rather than
misinterpretation of characters.

The text in that pattern has come from the $word in Sebastian's script:

buf="${buf#(#m)$word}"

Note that (barring accidents with /etc/zshenv) GLOB_SUBST is not on, so
$word should be substituted literally.  This came from:

word="$(<input2b.txt)"

which contains evidently valid multibyte characters (they're fine in the
output I'm seeing but I don't dare mail them raw).  xxd gives

0000000: 4167 6c6f 6742 4130 412f 4469 6666 2f41  AglogBA0A/Diff/A
0000010: 2f55 7365 7273 2f73 676e 6961 7a64 6f77  /Users/sgniazdow
0000020: 736b 692f 6769 7468 7562 2f7a 7368 2d6e  ski/github/zsh-n
0000030: 6176 6967 6174 696f 6e2d 746f 6f6c 732e  avigation-tools.
0000040: 6769 7441 3061 3837 6338 3034 3463 3163  gitA0a87c8044c1c
0000050: 3636 3737 6133 3863 6364 6162 6433 3633  6677a38ccdabd363
0000060: 3334 6363 3261 6161 6234 3936 4246 227a  34cc2aaab496BF"z
0000070: 6e74 2d74 6d75 782e 7a73 6820 e280 9320  nt-tmux.zsh ... 
0000080: 696e 6974 6961 6c20 636f 6d6d 6974 206f  initial commit o
0000090: 6620 736b 796c 6974 6532 3120 7375 626d  f skylite21 subm
00000a0: 6973 7369 6f6e 2259 0a                   ission"Y.

Here we have "e2 80 93" where we previously had "e2 80 83 ef bf bd". The
93 becomes B3 on metafication, which should give "e2 80 83 B3", which
isn't what we've got.

The function readoutput() that inputs the word does do metafication.
That's no great surprise as part of the mayhem is evidently due to the
fact it has been metafied at some point.  I've confirmed by stepping
through this gives 83 b3 [except gdb helpfully says \203\263, but that's
what you get with old technology].

However, when I hit getmatch() I've still got what I expect, the
correctly metafied input string with \203\263:

$11 = 0xb78a8d70 "\210\204m\212\001glogB\001\060\001/Diff/\001/Users/sgniazdowski/github/zsh-navigation-tools.git\001\060a87c8044c1c6677a38ccdabd36334cc2aaab496\002\006\"znt-tmux.zsh  \263 initial commit of skylite21 submission\"\031"

So some option / variant behaviour / extraneous memory effect is coming
into this.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness?  (was: Re: Cores almost on demand in patcompile())
  2016-10-11  6:51           ` type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Daniel Shahaf
@ 2016-10-13 10:22             ` Peter Stephenson
  2016-10-13 13:46               ` Bart Schaefer
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-13 10:22 UTC (permalink / raw)
  To: Zsh hackers list

On Tue, 11 Oct 2016 06:51:05 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Pardon me if this has been discussed before, but why don't we introduce
> the type definitions
> .
>     struct metafied_t { char *v; };
>     struct unmetafied_t { char *v; };
> .
> and start incrementally replacing uses of "char *" with uses of these
> types?  This will gain type checking for metafied v. unmetafied strings,
> as these two types do not implicitly convert into each other (attempts
> to do so generate a compiler warning).

This probably is a good idea, although the intermediate state where this
has been only partly done is likely to be a bit of a mess.  Modern
compilers should be able to keep this working efficiently.

Some thought could be given as to whether the unmetafied structure should
contain the length, too.  The only uses of unmetafied strings I can
think of that wouldn't need it are at the library / system interface,
which requires unmetafied null-terminated strings.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-13 10:22             ` Peter Stephenson
@ 2016-10-13 13:46               ` Bart Schaefer
  2016-10-14  6:36                 ` Daniel Shahaf
  0 siblings, 1 reply; 30+ messages in thread
From: Bart Schaefer @ 2016-10-13 13:46 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, Oct 13, 2016 at 3:22 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Tue, 11 Oct 2016 06:51:05 +0000
> Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>> Pardon me if this has been discussed before, but why don't we introduce
>> the type definitions
>> and start incrementally replacing uses of "char *" with uses of these
>> types?
>
> This probably is a good idea, although the intermediate state where this
> has been only partly done is likely to be a bit of a mess.

I'd expect to encounter a lot of problems with (char **) arrays where
every element of the array is (or not) metafied.  (Hopefully there
aren't any that are mixed).  As was noted in the discussion of passing
around lengths of arrays when manipulating array parameters, the older
code makes a lot of assumptions about pointer arithmetic and s[1][1]
subscripting and so on.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-13 13:46               ` Bart Schaefer
@ 2016-10-14  6:36                 ` Daniel Shahaf
  2016-10-14 16:53                   ` Peter Stephenson
  2016-10-14 23:04                   ` Oliver Kiddle
  0 siblings, 2 replies; 30+ messages in thread
From: Daniel Shahaf @ 2016-10-14  6:36 UTC (permalink / raw)
  To: Zsh hackers list

Bart Schaefer wrote on Thu, Oct 13, 2016 at 06:46:38 -0700:
> On Thu, Oct 13, 2016 at 3:22 AM, Peter Stephenson
> <p.stephenson@samsung.com> wrote:
> > On Tue, 11 Oct 2016 06:51:05 +0000
> > Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >> Pardon me if this has been discussed before, but why don't we introduce
> >> the type definitions
> >> and start incrementally replacing uses of "char *" with uses of these
> >> types?
> >
> > This probably is a good idea, although the intermediate state where this
> > has been only partly done is likely to be a bit of a mess.
> 
> I'd expect to encounter a lot of problems with (char **) arrays where
> every element of the array is (or not) metafied.  (Hopefully there
> aren't any that are mixed).  As was noted in the discussion of passing
> around lengths of arrays when manipulating array parameters, the older
> code makes a lot of assumptions about pointer arithmetic and s[1][1]
> subscripting and so on.

A 'char **' would become a 'struct metafied_t *', i.e., an array of
structs.  This is not equivalent: the array stride of the latter may be
larger than the array stride of the former.¹  However, this would only
be a problem if the code makes assumptions about where elements are
allocated relative to each other, e.g., if the code assumes that
«ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of
ary[N] and ary[M] in a single expression.

Does the code make such assumptions?

Cheers,

Daniel

¹ The array stride is sizeof() of the array element's type.  The
sizeof() of the struct type may be larger than sizeof() of its member
because structs are allowed to contain padding after the last element.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-14  6:36                 ` Daniel Shahaf
@ 2016-10-14 16:53                   ` Peter Stephenson
  2016-10-14 17:28                     ` Bart Schaefer
  2016-10-14 20:08                     ` Daniel Shahaf
  2016-10-14 23:04                   ` Oliver Kiddle
  1 sibling, 2 replies; 30+ messages in thread
From: Peter Stephenson @ 2016-10-14 16:53 UTC (permalink / raw)
  To: Zsh hackers list

On Fri, 14 Oct 2016 06:36:25 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> A 'char **' would become a 'struct metafied_t *', i.e., an array of
> structs.  This is not equivalent: the array stride of the latter may be
> larger than the array stride of the former.¹  However, this would only
> be a problem if the code makes assumptions about where elements are
> allocated relative to each other, e.g., if the code assumes that
> «ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of
> ary[N] and ary[M] in a single expression.
> 
> Does the code make such assumptions?

No, char ** is used fairly generically.

I don't think arrays of unmetafied strings are that common, and in at
least one case (the print builtin) having the length as part of the
unmetafied_t structure, avoiding a parallel length structure, is
beneficial.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-14 16:53                   ` Peter Stephenson
@ 2016-10-14 17:28                     ` Bart Schaefer
  2016-10-14 20:08                     ` Daniel Shahaf
  1 sibling, 0 replies; 30+ messages in thread
From: Bart Schaefer @ 2016-10-14 17:28 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

On Fri, Oct 14, 2016 at 9:53 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Fri, 14 Oct 2016 06:36:25 +0000
> Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>> A 'char **' would become a 'struct metafied_t *', i.e., an array of
>> structs.
>
> I don't think arrays of unmetafied strings are that common, and in at
> least one case (the print builtin) having the length as part of the
> unmetafied_t structure, avoiding a parallel length structure, is
> beneficial.

I am more concerned about the large number of places where s[0][1]
would have to become s[0].v[1] than about whether the strings are
metafied or not.  Similarly *s++ and so on.

Including the even larger number of places where we'd have to convert
e.g. "if (!s)"  to  "if (!s.v)" because it's not possible to pass a
null struct by value.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-14 16:53                   ` Peter Stephenson
  2016-10-14 17:28                     ` Bart Schaefer
@ 2016-10-14 20:08                     ` Daniel Shahaf
  1 sibling, 0 replies; 30+ messages in thread
From: Daniel Shahaf @ 2016-10-14 20:08 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

Peter Stephenson wrote on Fri, Oct 14, 2016 at 17:53:17 +0100:
> I don't think arrays of unmetafied strings are that common, and in at
> least one case (the print builtin) having the length as part of the
> unmetafied_t structure, avoiding a parallel length structure, is
> beneficial.

Ack.  I saw you say this in your previous mail; I didn't respond since
I don't have an opinion one way or the other as to how often the length
would be needed.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-14  6:36                 ` Daniel Shahaf
  2016-10-14 16:53                   ` Peter Stephenson
@ 2016-10-14 23:04                   ` Oliver Kiddle
  2016-10-15  8:30                     ` Daniel Shahaf
  1 sibling, 1 reply; 30+ messages in thread
From: Oliver Kiddle @ 2016-10-14 23:04 UTC (permalink / raw)
  To: Zsh hackers list

Daniel Shahaf wrote:
> > > This probably is a good idea, although the intermediate state where this
> > > has been only partly done is likely to be a bit of a mess.

Starting out with a simple typedef would at least add documentation and
allow an incremental approach. Would still need to add .v everywhere en
masse when going to a struct, though.

I did some work on a code base that had a convention of uint8_t*
for UTF-8. Seemed to work well as far as I could tell.

For the history file we should perhaps consider not using locale
dependent metafied strings. UTF-8 with an overlong encoding for a null
perhaps? grep etc might still not like the overlong null but they should
be rarer.

> allocated relative to each other, e.g., if the code assumes that
> «ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of

Even with char**, that condition is only likely if the array was
created with a literal assignment. And it is easy to test for
problems by forcing the size of the struct and running the test
cases.

Oliver


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
  2016-10-14 23:04                   ` Oliver Kiddle
@ 2016-10-15  8:30                     ` Daniel Shahaf
       [not found]                       ` <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
  0 siblings, 1 reply; 30+ messages in thread
From: Daniel Shahaf @ 2016-10-15  8:30 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote on Sat, Oct 15, 2016 at 01:04:58 +0200:
> Daniel Shahaf wrote:
> > > > This probably is a good idea, although the intermediate state where this
> > > > has been only partly done is likely to be a bit of a mess.
> 
> Starting out with a simple typedef would at least add documentation and
> allow an incremental approach. Would still need to add .v everywhere en
> masse when going to a struct, though.

Does anyone have a way to get type checking that doesn't involve
adding .v everywhere?  The solution doesn't _have_ to be portable; we
can use compiler-specific magic of gcc or clang, for example, so long as
some developers use that compiler routinely.

If we do the typedefs first, then adding .v later should be easy with
something like coccinelle's patching tool.  (It allows doing
search/replace in terms of the C syntax tree.)

> I did some work on a code base that had a convention of uint8_t*
> for UTF-8. Seemed to work well as far as I could tell.
> 

What's the advantage over chars or unsigned chars?

> For the history file we should perhaps consider not using locale
> dependent metafied strings. UTF-8 with an overlong encoding for a null
> perhaps? grep etc might still not like the overlong null but they should
> be rarer.

+1 to making the history file locale-agnostic.

> > allocated relative to each other, e.g., if the code assumes that
> > «ary[1] - ary[0] == 1+strlen(ary[0])» or otherwise uses the values of
> 
> Even with char**, that condition is only likely if the array was
> created with a literal assignment. And it is easy to test for
> problems by forcing the size of the struct and running the test
> cases.

I was thinking of code that allocates multiple elements in a single
malloc() chunk:

    char **array, *storage;
    for (i = 0; i < LENGTH_OF_LIST; i++)
        sum_of_lengths += strlen(list[i]) + 1;
    storage = malloc(sum_of_lengths);
    for (i = 0; i < LENGTH_OF_LIST; i++) {
        array[i] = strcpy(storage, list[i]);
        storage += strlen(array[i]) + 1;
    }

> Oliver
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Fwd: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
       [not found]                       ` <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
@ 2016-10-15 18:35                         ` Bart Schaefer
  0 siblings, 0 replies; 30+ messages in thread
From: Bart Schaefer @ 2016-10-15 18:35 UTC (permalink / raw)
  To: Zsh hackers list

[My apologies if this has appeared before, I got an error the first
time it doesn't seem to have come back to me through the list yet.]

On Sat, Oct 15, 2016 at 1:30 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> Does anyone have a way to get type checking that doesn't involve
> adding .v everywhere?

Wouldn't it suffice to use
  typedef char *unmeta_t;
  typedef unsigned char *meta_t;

(or the reverse if we believe we're mostly going to be working on
meta_t).  If we do that and also enable the GCC warnings -Wtype-limits
-Wconversion -Wformat-signedness would we not get adequate verbosity
without changing pointer arithmetic and dereferencing?

I hadn't even considered all the places where using a struct would
change memory allocation strategy.  Oof.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-13  9:43           ` Cores almost on demand in patcompile() Peter Stephenson
@ 2016-10-19 11:14             ` Sebastian Gniazdowski
  2016-10-19 13:14               ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-19 11:14 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Bart Schaefer, Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]

Maybe my inexperienced point of view will help? Typical pscan, next values are:

====== BEGIN ====== exp: zplugin�saved�visual�line�mode
pscan: 0x7fd9b425d820, next: 0xffffffe700000000
AFTER pscan: 0x7fd9b425d820, next: 0x7fd9b425d850
pscan: 0x7fd9b425d850, next: 0x7fd9b425d850
AFTER pscan: 0x7fd9b425d850, next: 0x0

When core is triggered, this looks like:

====== BEGIN ====== exp:
��m�AglogBA0A/Diff/A/Users/sgniazdowski/github/zsh-navigation-tools.gitA0a87c8044c1c6677a38ccdabd36334cc2aaab496BF"znt-tmux.zsh
 � initial commit of skylite21 submission"Y
pscan: 0x7f9bb3d075e0, next: 0x10886db73
AFTER pscan: 0x7f9bb3d075e0, next: 0x7f9bb3d07698
pscan: 0x7f9bb3d07698, next: 0x7f9bb3d07698
AFTER pscan: 0x7f9bb3d07698, next: 0xff9bb3d07698
pscan: 0xff9bb3d07698, next: 0xff9bb3d07698


Cannot print last "next" from debugger, inaccessible memory. What can
be seen here? First next value seems to be weird in both cases. Either
0xffffff at the beginning, or low value 0x10886db73 (low when compared
to pscan's value). Then, AFTER message shows the weird value is fixed.
First log says there should be 0x0 after successful processing. In
second log it is seen that instead of 0x0 another weird value is
assigned to "next" – it starts with 0xff. I did many runs and it was
always that the odd value appeared before core.

I also did step by step walk through patcompile(). Unluckily it wasn't
a core-triggering dump (next ended with 0x0). I attach screenshots
with some crucial places.

dbg_metacharinc_detecting_meta.gif
dbg_metacharinc_finishing.gif

Traversing the string METACHARINC() is called. It rather correctly
detects special characters and skips them, as shown.


dbg_patadd_1_length.gif
dbg_patadd_2_string.gif

Pattern is being added, it's length is visible, number of meta
characters, also P_LS_STR result.


dbg_patadd_nmeta.gif

An action is taken, metas counted again.


dbg_patcompiece_detecting_meta.gif

patcomppiece() correctly detects meta characters


dbg_patoptail_value_unavailable_1.gif
dbg_patoptail_value_unavailable_2.gif

Detected some incorrect pointers, however I might misunderstand what ptr is.

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: dbg_metacharinc_detecting_meta.gif --]
[-- Type: image/gif, Size: 67569 bytes --]

[-- Attachment #3: dbg_metacharinc_finishing.gif --]
[-- Type: image/gif, Size: 32347 bytes --]

[-- Attachment #4: dbg_patadd_1_length.gif --]
[-- Type: image/gif, Size: 75139 bytes --]

[-- Attachment #5: dbg_patadd_2_string.gif --]
[-- Type: image/gif, Size: 109192 bytes --]

[-- Attachment #6: dbg_patadd_nmeta.gif --]
[-- Type: image/gif, Size: 54553 bytes --]

[-- Attachment #7: dbg_patcompiece_detecting_meta.gif --]
[-- Type: image/gif, Size: 92386 bytes --]

[-- Attachment #8: dbg_patoptail_value_unavailable_1.gif --]
[-- Type: image/gif, Size: 97764 bytes --]

[-- Attachment #9: dbg_patoptail_value_unavailable_2.gif --]
[-- Type: image/gif, Size: 51170 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-19 11:14             ` Sebastian Gniazdowski
@ 2016-10-19 13:14               ` Peter Stephenson
       [not found]                 ` <CAKc7PVBhHFUWbMobAeDptgXmZ=S6RVsuNB7Qwsq555Srya_5qg@mail.gmail.com>
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-19 13:14 UTC (permalink / raw)
  To: Zsh hackers list

On Wed, 19 Oct 2016 13:14:47 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> I also did step by step walk through patcompile(). Unluckily it wasn't
> a core-triggering dump (next ended with 0x0). I attach screenshots
> with some crucial places.

Almost ceratinly you need to hit misbehaviour (or be about to hit
misbehaviour :-() before we're going to get anywhere.  It's not
fundamentally broken in normal cases.

If you can provoke it frequently enough, valgrind is the most likely
thing to help.  In your case, you might think a few runs under valgrind
should produce some interesting out.

I tried turning on the additional valgrind integration for heaps, but
that was doing weird things, in fact rather dishearteningly two sits of
different weird things on two different machines (one rather out of
date).

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
       [not found]                 ` <CAKc7PVBhHFUWbMobAeDptgXmZ=S6RVsuNB7Qwsq555Srya_5qg@mail.gmail.com>
@ 2016-10-20  8:56                   ` Bart Schaefer
  2016-10-20  9:32                   ` Peter Stephenson
  1 sibling, 0 replies; 30+ messages in thread
From: Bart Schaefer @ 2016-10-20  8:56 UTC (permalink / raw)
  To: Sebastian Gniazdowski, Zsh hackers list; +Cc: Peter Stephenson

Problems with mail from gmail reaching the mailing list, persist.


On Wed, Oct 19, 2016 at 10:55 PM, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> Valgrind outputs two "Invalid read of size 8" messages. Don't know why
> there are no line pointers to source, however the reads are in
> patcompile(). I'm afraid that are PATNEXT invocations, final
> segmentation-fault places.


---------- Forwarded message ----------
From: Bart Schaefer <schaefer@brasslantern.com>
Date: Wed, Oct 19, 2016 at 10:31 PM
Subject: valgrind of patcompile() errors
To: zsh-workers@zsh.org


I do not get these errors on a second machine architecture I tried.  The
difference seems to be that the error happens on the 64bit architecture
but not on 32bit.

This one line may be telling:

==26676==    by 0x49F539: patcompile (pattern.c:672)

That is inside a block where a metafied string is converted back to an
unmetafied one to do a literal match.


==26676== Memcheck, a memory error detector
==26676== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==26676== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==26676== Command: Src/zsh -f test2.zsh
==26676==
==26676== Invalid read of size 8
==26676==    at 0x49F420: patcompile (pattern.c:651)
==26676==    by 0x453ED0: compgetmatch (glob.c:2612)
==26676==    by 0x453F84: getmatch (glob.c:2652)
==26676==    by 0x4B6834: paramsubst (subst.c:3033)
==26676==    by 0x4B0E7A: stringsubst (subst.c:247)
==26676==    by 0x4B01FD: prefork (subst.c:85)
==26676==    by 0x440AEF: addvars (exec.c:2388)
==26676==    by 0x43C5AF: execsimple (exec.c:1158)
==26676==    by 0x43CBD7: execlist (exec.c:1296)
==26676==    by 0x43C464: execode (exec.c:1115)
==26676==    by 0x462167: loop (init.c:208)
==26676==    by 0x466688: zsh_main (init.c:1692)
==26676==  Address 0x61d7c18 is 248 bytes inside a block of size 256 free'd
==26676==    at 0x4C2B7B2: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26676==    by 0x47DB4F: zrealloc (mem.c:1008)
==26676==    by 0x49EB04: patadd (pattern.c:414)
==26676==    by 0x49F539: patcompile (pattern.c:672)
==26676==    by 0x453ED0: compgetmatch (glob.c:2612)
==26676==    by 0x453F84: getmatch (glob.c:2652)
==26676==    by 0x4B6834: paramsubst (subst.c:3033)
==26676==    by 0x4B0E7A: stringsubst (subst.c:247)
==26676==    by 0x4B01FD: prefork (subst.c:85)
==26676==    by 0x440AEF: addvars (exec.c:2388)
==26676==    by 0x43C5AF: execsimple (exec.c:1158)
==26676==    by 0x43CBD7: execlist (exec.c:1296)
==26676==
==26676== Invalid read of size 8
==26676==    at 0x49F48A: patcompile (pattern.c:652)
==26676==    by 0x453ED0: compgetmatch (glob.c:2612)
==26676==    by 0x453F84: getmatch (glob.c:2652)
==26676==    by 0x4B6834: paramsubst (subst.c:3033)
==26676==    by 0x4B0E7A: stringsubst (subst.c:247)
==26676==    by 0x4B01FD: prefork (subst.c:85)
==26676==    by 0x440AEF: addvars (exec.c:2388)
==26676==    by 0x43C5AF: execsimple (exec.c:1158)
==26676==    by 0x43CBD7: execlist (exec.c:1296)
==26676==    by 0x43C464: execode (exec.c:1115)
==26676==    by 0x462167: loop (init.c:208)
==26676==    by 0x466688: zsh_main (init.c:1692)
==26676==  Address 0x61d7c18 is 248 bytes inside a block of size 256 free'd
==26676==    at 0x4C2B7B2: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26676==    by 0x47DB4F: zrealloc (mem.c:1008)
==26676==    by 0x49EB04: patadd (pattern.c:414)
==26676==    by 0x49F539: patcompile (pattern.c:672)
==26676==    by 0x453ED0: compgetmatch (glob.c:2612)
==26676==    by 0x453F84: getmatch (glob.c:2652)
==26676==    by 0x4B6834: paramsubst (subst.c:3033)
==26676==    by 0x4B0E7A: stringsubst (subst.c:247)
==26676==    by 0x4B01FD: prefork (subst.c:85)
==26676==    by 0x440AEF: addvars (exec.c:2388)
==26676==    by 0x43C5AF: execsimple (exec.c:1158)
==26676==    by 0x43CBD7: execlist (exec.c:1296)
==26676==


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
       [not found]                 ` <CAKc7PVBhHFUWbMobAeDptgXmZ=S6RVsuNB7Qwsq555Srya_5qg@mail.gmail.com>
  2016-10-20  8:56                   ` Bart Schaefer
@ 2016-10-20  9:32                   ` Peter Stephenson
  2016-10-20  9:56                     ` Sebastian Gniazdowski
  1 sibling, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20  9:32 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 07:55:13 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Valgrind outputs two "Invalid read of size 8" messages. Don't know why
> there are no line pointers to source, however the reads are in
> patcompile(). I'm afraid that are PATNEXT invocations, final
> segmentation-fault places.

Thanks, I think we're getting somewhere.  Yes, I think the actual
problem is in the block where you've been adding the debugging.
It's the same one Bart noted when he managed to get this to show up with
the line numbers.

I think this:

			if (nmeta) {
			    char *oldpatout = patout;
			    patadd(NULL, 0, nmeta, 0);
			    /*
			     * Yuk.
			     */
			    p = (Patprog)patout;
			    opnd = patout + (opnd - oldpatout);
			    dst = patout + startoff;
			}

can have an effect on where pscan should be pointing because of the
reallocation.  A better way of doing this would be loop first to count
the space needed then allocate it.

See if this helps (I think next is the key one to update):

diff --git a/Src/pattern.c b/Src/pattern.c
index 4e2f236..158bfd5 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -669,12 +669,16 @@ patcompile(char *exp, int inflags, char **endexp)
 				nmeta++;
 			if (nmeta) {
 			    char *oldpatout = patout;
+			    ptrdiff_t pd;
 			    patadd(NULL, 0, nmeta, 0);
 			    /*
 			     * Yuk.
 			     */
 			    p = (Patprog)patout;
-			    opnd = patout + (opnd - oldpatout);
+			    pd = patout - oldpatout;
+			    opnd += pd;
+			    pscan += pd;
+			    next += pd;
 			    dst = patout + startoff;
 			}
 


pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20  9:32                   ` Peter Stephenson
@ 2016-10-20  9:56                     ` Sebastian Gniazdowski
  2016-10-20 10:18                       ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-20  9:56 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list, Bart Schaefer

On 20 October 2016 at 11:32, Peter Stephenson <p.stephenson@samsung.com> wrote:
> On Thu, 20 Oct 2016 07:55:13 +0200
> See if this helps (I think next is the key one to update):
>
> diff --git a/Src/pattern.c b/Src/pattern.c

Still segfaults in the same place, and Valgrind reports two 8-byte reads.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20  9:56                     ` Sebastian Gniazdowski
@ 2016-10-20 10:18                       ` Peter Stephenson
  2016-10-20 10:30                         ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20 10:18 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 11:56:30 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> On 20 October 2016 at 11:32, Peter Stephenson <p.stephenson@samsung.com> wrote:
> > On Thu, 20 Oct 2016 07:55:13 +0200
> > See if this helps (I think next is the key one to update):
> >
> > diff --git a/Src/pattern.c b/Src/pattern.c
> 
> Still segfaults in the same place, and Valgrind reports two 8-byte reads.

Hmm... well, what I've posted fixes the pointers at line 650 of
pattern.c

		for (; pscan; pscan = next) {
		    next = PATNEXT(pscan);

where they would have been wrong before, so if you're *still* seeing
problems after the change, you've found something else.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 10:18                       ` Peter Stephenson
@ 2016-10-20 10:30                         ` Sebastian Gniazdowski
  2016-10-20 10:42                           ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-20 10:30 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list, Bart Schaefer

On 20 October 2016 at 12:18, Peter Stephenson <p.stephenson@samsung.com> wrote:
> Hmm... well, what I've posted fixes the pointers at line 650 of
> pattern.c
>
>                 for (; pscan; pscan = next) {
>                     next = PATNEXT(pscan);
>
> where they would have been wrong before, so if you're *still* seeing
> problems after the change, you've found something else.

Valgrind points at patadd(NULL, 0, nmeta, 0). Wonder why not to its
interior? But to all logic, problem should be inside patadd() because
nothing else near dereferences a pointer. So there might be two
problems. Debugger didn't report inaccessible memory when I did
step-over on the patadd(), maybe memory is accessible but invalid from
other reason recognized by Valgrind.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 10:30                         ` Sebastian Gniazdowski
@ 2016-10-20 10:42                           ` Peter Stephenson
  2016-10-20 10:56                             ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20 10:42 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 12:30:50 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Valgrind points at patadd(NULL, 0, nmeta, 0). Wonder why not to its
> interior? But to all logic, problem should be inside patadd() because
> nothing else near dereferences a pointer. So there might be two
> problems. Debugger didn't report inaccessible memory when I did
> step-over on the patadd(), maybe memory is accessible but invalid from
> other reason recognized by Valgrind.

Just to be sure, could you confirm the problem goes away if you change
line 292 of pattern.c

/* Default size for pattern buffer */
#define P_DEF_ALLOC 256

to

/* Default size for pattern buffer */
#define P_DEF_ALLOC 512

?  That's not a fix, it's just putting off the problem, but if it's
initially allocating something larger than what your pattern needs I'd
expect the crash not to happen.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 10:42                           ` Peter Stephenson
@ 2016-10-20 10:56                             ` Peter Stephenson
  2016-10-20 11:03                               ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20 10:56 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 11:42:16 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> On Thu, 20 Oct 2016 12:30:50 +0200
> Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> > Valgrind points at patadd(NULL, 0, nmeta, 0). Wonder why not to its
> > interior? But to all logic, problem should be inside patadd() because
> > nothing else near dereferences a pointer. So there might be two
> > problems. Debugger didn't report inaccessible memory when I did
> > step-over on the patadd(), maybe memory is accessible but invalid from
> > other reason recognized by Valgrind.
> 
> Just to be sure, could you confirm the problem goes away if you change
> line 292 of pattern.c
> 
> /* Default size for pattern buffer */
> #define P_DEF_ALLOC 256
> 
> to
> 
> /* Default size for pattern buffer */
> #define P_DEF_ALLOC 512
> 
> ?  That's not a fix, it's just putting off the problem, but if it's
> initially allocating something larger than what your pattern needs I'd
> expect the crash not to happen.

I'm now starting to wonder if the realloc is a red herring and the key
point is this...

		 * Careful in case we've overwritten the node for the next ptr.

It's a long time since I did this but if the P_PURESTR flag is set,
I don't think there can be more than one P_EXACTLY.  So the solution may
be to break out of the for loop at the end of the

		    if (P_OP(pscan) == P_EXACTLY) {
		        /* .... */
			break;      /* <- here... */
		    }

immediately after line 692 in the modified code since the "next" can't
be relevant any more.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 10:56                             ` Peter Stephenson
@ 2016-10-20 11:03                               ` Peter Stephenson
  2016-10-20 11:09                                 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20 11:03 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 11:56:34 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> It's a long time since I did this but if the P_PURESTR flag is set,
> I don't think there can be more than one P_EXACTLY.  So the solution may
> be to break out of the for loop at the end of the
> 
> 		    if (P_OP(pscan) == P_EXACTLY) {
> 		        /* .... */
> 			break;      /* <- here... */
> 		    }

This time with a patch (hope everyone's enjoying the white knuckle ride)

pws

diff --git a/Src/pattern.c b/Src/pattern.c
index 158bfd5..ba7c155 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -690,6 +690,8 @@ patcompile(char *exp, int inflags, char **endexp)
 				*dst++ = *opnd++;
 			    }
 			}
+			/* Only one string in a PAT_PURES, so now done. */
+			break;
 		    }
 		}
 		p->size = dst - patout;


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 11:03                               ` Peter Stephenson
@ 2016-10-20 11:09                                 ` Sebastian Gniazdowski
  2016-10-20 11:23                                   ` Peter Stephenson
  0 siblings, 1 reply; 30+ messages in thread
From: Sebastian Gniazdowski @ 2016-10-20 11:09 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list, Bart Schaefer

On 20 October 2016 at 13:03, Peter Stephenson <p.stephenson@samsung.com> wrote:
>>                   if (P_OP(pscan) == P_EXACTLY) {
>>                       /* .... */
>>                       break;      /* <- here... */
>>                   }
>
> This time with a patch (hope everyone's enjoying the white knuckle ride)
>
> pws
>
> diff --git a/Src/pattern.c b/Src/pattern.c

Tested the change, no segfault, also when break is added to unmodified
code. Also checked if the pattern still matches (made use of the
prepared input1.txt, input2.txt) and it does, in both versions.

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Cores almost on demand in patcompile()
  2016-10-20 11:09                                 ` Sebastian Gniazdowski
@ 2016-10-20 11:23                                   ` Peter Stephenson
  0 siblings, 0 replies; 30+ messages in thread
From: Peter Stephenson @ 2016-10-20 11:23 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, 20 Oct 2016 13:09:25 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Tested the change, no segfault, also when break is added to unmodified
> code. Also checked if the pattern still matches (made use of the
> prepared input1.txt, input2.txt) and it does, in both versions.

Thanks.

I think that *is* the correct fix --- we add PAT_PURES to the flag that
will later be used when we run the pattern, and in that case any of the
usual wordcode infrastructure is irrelevant because we do indeed treat
it just as a single (metafied :-() string.  So breaking out of the loop
immediately is the right thing to do.

pws


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2016-10-22  3:29 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-09  9:00 Cores almost on demand in patcompile() Sebastian Gniazdowski
2016-10-09  9:16 ` Sebastian Gniazdowski
2016-10-09 10:15   ` Sebastian Gniazdowski
2016-10-09 16:09     ` Sebastian Gniazdowski
2016-10-10 15:31       ` Sebastian Gniazdowski
2016-10-11  2:46         ` Bart Schaefer
2016-10-11  2:53           ` Bart Schaefer
2016-10-11  6:51           ` type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Daniel Shahaf
2016-10-13 10:22             ` Peter Stephenson
2016-10-13 13:46               ` Bart Schaefer
2016-10-14  6:36                 ` Daniel Shahaf
2016-10-14 16:53                   ` Peter Stephenson
2016-10-14 17:28                     ` Bart Schaefer
2016-10-14 20:08                     ` Daniel Shahaf
2016-10-14 23:04                   ` Oliver Kiddle
2016-10-15  8:30                     ` Daniel Shahaf
     [not found]                       ` <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
2016-10-15 18:35                         ` Fwd: " Bart Schaefer
2016-10-13  9:43           ` Cores almost on demand in patcompile() Peter Stephenson
2016-10-19 11:14             ` Sebastian Gniazdowski
2016-10-19 13:14               ` Peter Stephenson
     [not found]                 ` <CAKc7PVBhHFUWbMobAeDptgXmZ=S6RVsuNB7Qwsq555Srya_5qg@mail.gmail.com>
2016-10-20  8:56                   ` Bart Schaefer
2016-10-20  9:32                   ` Peter Stephenson
2016-10-20  9:56                     ` Sebastian Gniazdowski
2016-10-20 10:18                       ` Peter Stephenson
2016-10-20 10:30                         ` Sebastian Gniazdowski
2016-10-20 10:42                           ` Peter Stephenson
2016-10-20 10:56                             ` Peter Stephenson
2016-10-20 11:03                               ` Peter Stephenson
2016-10-20 11:09                                 ` Sebastian Gniazdowski
2016-10-20 11:23                                   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).