zsh-workers
 help / color / mirror / code / Atom feed
From: "Mikael Magnusson" <mikachu@gmail.com>
To: "Peter Stephenson" <p.w.stephenson@ntlworld.com>
Cc: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: functrace and funcsourcetrace (was Re: PATCH: trace information for sourced files)
Date: Mon, 18 Aug 2008 13:13:39 +0200	[thread overview]
Message-ID: <237967ef0808180413q6a98d584k7cd0be52c07550ef@mail.gmail.com> (raw)
In-Reply-To: <20080813220528.24263eb3@pws-pc>

2008/8/13 Peter Stephenson <p.w.stephenson@ntlworld.com>:
> On Wed, 13 Aug 2008 21:43:18 +0100
> Peter Stephenson <p.w.stephenson@ntlworld.com> 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


  parent reply	other threads:[~2008-08-18 11:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13  0:00 Rocky Bernstein
2008-08-13 19:42 ` Peter Stephenson
2008-08-13 20:43   ` Peter Stephenson
2008-08-13 21:05     ` Peter Stephenson
2008-08-13 22:06       ` Rocky Bernstein
2008-08-18 11:13       ` Mikael Magnusson [this message]
2008-08-21 15:31         ` Peter Stephenson
2008-08-21 20:21           ` Mikael Magnusson
2008-08-22 15:33         ` Peter Stephenson
2008-08-22 15:48           ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=237967ef0808180413q6a98d584k7cd0be52c07550ef@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).