Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: functrace and funcsourcetrace (was Re: PATCH: trace information for sourced files)
- X-seq: zsh-workers 25478
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "Peter Stephenson" <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: functrace and funcsourcetrace (was Re: PATCH: trace information for sourced files)
- Date: Mon, 18 Aug 2008 13:13:39 +0200
- Cc: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=SI/EI6B00ZODAZK6/ZOLu0UaanYR/yzXiu19FKE7UJs=; b=okrjEk7PDOC/bDi7We9xXvMKInZVnHIDgt2wVvf5mKD0OOWuWzOW9lo1iMpnStMH+7 ha3ziwjSI0Kbbci7EgEH8NVN4suQilOSTZWpHuxVngJhtuvWqErZRZ8SNr0TlIP1fVBv pcJCzmr0hH2/rzqOy5JdvQ0EoA/b/mu1o77uo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kvUjTsd56CnneJlfTprSwYOYyFJSVJVMrV4dtN79cXVlWfq9A3NNTjdI8jcUx6aM9i Vvk6kH/bOAafCf26BKGVNRQN3zu2VYH4GYha/CSvCso502LBO3ovmufE8V0pDlEqYwpx qwEp50ESESb2iVCbKF9mTK7GOEnXdwNY8evNE=
- In-reply-to: <20080813220528.24263eb3@pws-pc>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210808121700kf500ea6p9b3eed0fefadfc8@xxxxxxxxxxxxxx> <20080813204212.4c72c96a@pws-pc> <20080813214318.09f570e7@pws-pc> <20080813220528.24263eb3@pws-pc>
2008/8/13 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>:
> On Wed, 13 Aug 2008 21:43:18 +0100
> Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
>> I think this one does specifically what you want, and if it doesn't, we
>> should now have enough information to tweak it.
>
> Committed, since it's certainly going the right way. I'm now likely to be offline for
> a week and a bit.
The current cvs zsh crashes for me on any tabcompletion now iff i've
done a zcompile on the functions dir in /usr/local/share/zsh/blabla.
The first commit with the crash is "25247 with further modifications:
add $funcsourcetrace":
% cd<tab>
Program received signal SIGSEGV, Segmentation fault.
0x41b6624b in strlen () from /lib/libc.so.6
(gdb) bt
#0 0x41b6624b in strlen () from /lib/libc.so.6
#1 0x080bfb10 in dupstring (s=0x3cff9c3 <Address 0x3cff9c3 out of
bounds>) at string.c:39
#2 0x08073673 in execautofn (state=0xaf92bf1c, do_exec=0) at exec.c:4075
#3 0x08071045 in execcmd (state=0xaf92bf1c, input=0, output=0,
how=18, last1=2) at exec.c:2979
#4 0x0806cfe2 in execpline2 (state=0xaf92bf1c, pcode=3, how=18,
input=0, output=0, last1=0)
at exec.c:1541
#5 0x0806c378 in execpline (state=0xaf92bf1c, slcode=3074, how=18,
last1=0) at exec.c:1327
#6 0x0806bbb9 in execlist (state=0xaf92bf1c, dont_change_job=1,
exiting=0) at exec.c:1125
#7 0x0806b725 in execode (p=0x82cd5c8, dont_change_job=1, exiting=0)
at exec.c:965
#8 0x08074063 in runshfunc (prog=0x82cd5c8, wrap=0x0, name=0xa7ae7710
"_normal") at exec.c:4382
#9 0xa7b219fc in comp_wrapper (prog=0x82cd5c8, w=0x0, name=0xa7ae7710
"_normal")
at complete.c:1449
#10 0x08073ff2 in runshfunc (prog=0x82cd5c8, wrap=0xa7b3c720,
name=0xa7ae7710 "_normal")
at exec.c:4370
#11 0x08073dd6 in doshfunc (name=0x82cd608 "_normal", prog=0x82cd5c8,
doshargs=0xa7ae76d0,
flags=270848, noreturnval=0) at exec.c:4291
#12 0x080735c5 in execshfunc (shf=0x82cd5a8, args=0xa7ae76d0) at exec.c:4044
#13 0x0807123c in execcmd (state=0xaf92ce2c, input=0, output=0, how=2,
last1=2) at exec.c:3027
#14 0x0806cfe2 in execpline2 (state=0xaf92ce2c, pcode=7555, how=2,
input=0, output=0, last1=0)
at exec.c:1541
#15 0x0806c378 in execpline (state=0xaf92ce2c, slcode=4130, how=2,
last1=0) at exec.c:1327
#16 0x0806bc05 in execlist (state=0xaf92ce2c, dont_change_job=1,
exiting=0) at exec.c:1132
#17 0x08093dea in execif (state=0xaf92ce2c, do_exec=0) at loop.c:515
#18 0x08071045 in execcmd (state=0xaf92ce2c, input=0, output=0, how=2,
last1=2) at exec.c:2979
#19 0x0806cfe2 in execpline2 (state=0xaf92ce2c, pcode=7427, how=2,
input=0, output=0, last1=0)
at exec.c:1541
#20 0x0806c378 in execpline (state=0xaf92ce2c, slcode=114690, how=2,
last1=0) at exec.c:1327
#21 0x0806bbb9 in execlist (state=0xaf92ce2c, dont_change_job=1,
exiting=0) at exec.c:1125
#22 0x0806b725 in execode (p=0x82cd790, dont_change_job=1, exiting=0)
at exec.c:965
---Type <return> to continue, or q <return> to quit---
#23 0x080736c1 in execautofn (state=0xaf92d48c, do_exec=0) at exec.c:4080
#24 0x08071045 in execcmd (state=0xaf92d48c, input=0, output=0,
how=18, last1=2) at exec.c:2979
#25 0x0806cfe2 in execpline2 (state=0xaf92d48c, pcode=3, how=18,
input=0, output=0, last1=0)
at exec.c:1541
#26 0x0806c378 in execpline (state=0xaf92d48c, slcode=3074, how=18,
last1=0) at exec.c:1327
#27 0x0806bbb9 in execlist (state=0xaf92d48c, dont_change_job=1,
exiting=0) at exec.c:1125
#28 0x0806b725 in execode (p=0x82c59e8, dont_change_job=1, exiting=0)
at exec.c:965
#29 0x08074063 in runshfunc (prog=0x82c59e8, wrap=0x0, name=0xa7ae71f0
"_complete")
at exec.c:4382
#30 0xa7b219fc in comp_wrapper (prog=0x82c59e8, w=0x0, name=0xa7ae71f0
"_complete")
at complete.c:1449
#31 0x08073ff2 in runshfunc (prog=0x82c59e8, wrap=0xa7b3c720,
name=0xa7ae71f0 "_complete")
at exec.c:4370
#32 0x08073dd6 in doshfunc (name=0x82c5a28 "_complete",
prog=0x82c59e8, doshargs=0xa7ae71b0,
flags=270848, noreturnval=0) at exec.c:4291
#33 0x080735c5 in execshfunc (shf=0x82c59c8, args=0xa7ae71b0) at exec.c:4044
#34 0x0807123c in execcmd (state=0xaf92f0bc, input=0, output=0,
how=18, last1=2) at exec.c:3027
#35 0x0806cfe2 in execpline2 (state=0xaf92f0bc, pcode=10371, how=18,
input=0, output=0, last1=0)
at exec.c:1541
#36 0x0806c378 in execpline (state=0xaf92f0bc, slcode=3074, how=18,
last1=0) at exec.c:1327
#37 0x0806bbb9 in execlist (state=0xaf92f0bc, dont_change_job=1,
exiting=0) at exec.c:1125
#38 0x08093d45 in execif (state=0xaf92f0bc, do_exec=0) at loop.c:500
#39 0x08071045 in execcmd (state=0xaf92f0bc, input=0, output=0, how=2,
last1=2) at exec.c:2979
#40 0x0806cfe2 in execpline2 (state=0xaf92f0bc, pcode=10051, how=2,
input=0, output=0, last1=0)
at exec.c:1541
#41 0x0806c378 in execpline (state=0xaf92f0bc, slcode=48130, how=2,
last1=0) at exec.c:1327
#42 0x0806bbb9 in execlist (state=0xaf92f0bc, dont_change_job=1,
exiting=0) at exec.c:1125
#43 0x0809300c in execfor (state=0xaf92f0bc, do_exec=0) at loop.c:159
#44 0x08071045 in execcmd (state=0xaf92f0bc, input=0, output=0, how=2,
last1=2) at exec.c:2979
---Type <return> to continue, or q <return> to quit---
#45 0x0806cfe2 in execpline2 (state=0xaf92f0bc, pcode=9539, how=2,
input=0, output=0, last1=0)
at exec.c:1541
#46 0x0806c378 in execpline (state=0xaf92f0bc, slcode=90114, how=2,
last1=0) at exec.c:1327
#47 0x0806bbb9 in execlist (state=0xaf92f0bc, dont_change_job=1,
exiting=0) at exec.c:1125
#48 0x0809300c in execfor (state=0xaf92f0bc, do_exec=0) at loop.c:159
#49 0x08071045 in execcmd (state=0xaf92f0bc, input=0, output=0, how=2,
last1=2) at exec.c:2979
#50 0x0806cfe2 in execpline2 (state=0xaf92f0bc, pcode=8067, how=2,
input=0, output=0, last1=0)
at exec.c:1541
#51 0x0806c378 in execpline (state=0xaf92f0bc, slcode=220162, how=2,
last1=0) at exec.c:1327
#52 0x0806bbb9 in execlist (state=0xaf92f0bc, dont_change_job=1,
exiting=0) at exec.c:1125
#53 0x0806b725 in execode (p=0x82e0e50, dont_change_job=1, exiting=0)
at exec.c:965
#54 0x080736c1 in execautofn (state=0xaf92f71c, do_exec=0) at exec.c:4080
#55 0x08071045 in execcmd (state=0xaf92f71c, input=0, output=0,
how=18, last1=2) at exec.c:2979
#56 0x0806cfe2 in execpline2 (state=0xaf92f71c, pcode=3, how=18,
input=0, output=0, last1=0)
at exec.c:1541
#57 0x0806c378 in execpline (state=0xaf92f71c, slcode=3074, how=18,
last1=0) at exec.c:1327
#58 0x0806bbb9 in execlist (state=0xaf92f71c, dont_change_job=1,
exiting=0) at exec.c:1125
#59 0x0806b725 in execode (p=0x82cbf30, dont_change_job=1, exiting=0)
at exec.c:965
#60 0x08074063 in runshfunc (prog=0x82cbf30, wrap=0x0, name=0xa7ae5030
"_main_complete")
at exec.c:4382
#61 0xa7b219fc in comp_wrapper (prog=0x82cbf30, w=0x0, name=0xa7ae5030
"_main_complete")
at complete.c:1449
#62 0x08073ff2 in runshfunc (prog=0x82cbf30, wrap=0xa7b3c720,
name=0xa7ae5030 "_main_complete")
at exec.c:4370
#63 0x08073dd6 in doshfunc (name=0x829bad8 "_main_complete",
prog=0x82cbf30, doshargs=0x0,
flags=0, noreturnval=0) at exec.c:4291
#64 0xa7b242e1 in callcompfunc (s=0xa7c72758 "", fn=0x829bad8
"_main_complete") at compcore.c:817
#65 0xa7b24bb3 in makecomplist (s=0xa7c72758 "", incmd=0, lst=0) at
compcore.c:968
#66 0xa7b22942 in do_completion (dummy=0xa7b7a9d4, dat=0xaf92fb98) at
compcore.c:349
---Type <return> to continue, or q <return> to quit---
#67 0x0809ae60 in runhookdef (h=0xa7b7a9d4, d=0xaf92fb98) at module.c:996
#68 0xa7b6a9b7 in docompletion (s=0x82dff38 "", lst=0, incmd=0) at
zle_tricky.c:2135
#69 0xa7b66a37 in docomplete (lst=0) at zle_tricky.c:859
#70 0xa7b654b7 in expandorcomplete (args=0xa7b7ac9c) at zle_tricky.c:315
#71 0xa7b6505a in completecall (args=0xa7b7ac9c) at zle_tricky.c:208
#72 0xa7b54c82 in execzlefunc (func=0xa7b78cd0, args=0xa7b7ac9c,
set_bindk=0) at zle_main.c:1291
#73 0xa7b541b2 in zlecore () at zle_main.c:1043
#74 0xa7b548c3 in zleread (lp=0x80f4adc, rp=0x80f4a64, flags=7,
context=0) at zle_main.c:1205
#75 0xa7b56a51 in zle_main_entry (cmd=1, ap=0xaf930004 "") at zle_main.c:1834
#76 0x08087189 in zleentry (cmd=1) at init.c:1256
#77 0x08087a6a in inputline () at input.c:278
#78 0x080878d9 in ingetc () at input.c:214
#79 0x0807de0e in ihgetc () at hist.c:263
#80 0x0808fc03 in gettok () at lex.c:663
#81 0x0808f48e in yylex () at lex.c:350
#82 0x080abe21 in parse_event () at parse.c:451
#83 0x08084827 in loop (toplevel=1, justonce=0) at init.c:129
#84 0x0808750a in zsh_main (argc=1, argv=0xaf930264) at init.c:1407
#85 0x080551f6 in main (argc=Cannot access memory at address 0x3
) at ./main.c:93
(gdb) print shf->filename
No symbol "shf" in current context.
(gdb) frame 1
#1 0x080bfb10 in dupstring (s=0x3cff9c3 <Address 0x3cff9c3 out of
bounds>) at string.c:39
39 t = (char *) zhalloc(strlen((char *)s) + 1);
(gdb) print s
$1 = 0x3cff9c3 <Address 0x3cff9c3 out of bounds>
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author