zsh-users
 help / color / mirror / code / Atom feed
From: Kevin Sullivan <kevins@drkstr.lkg.dec.com>
To: zsh-users@math.gatech.edu
Subject: Problem with autoload.
Date: Tue, 2 Dec 1997 18:22:31 -0500	[thread overview]
Message-ID: <9712022322.AA17913@drkstr.lkg.dec.com> (raw)


Hello, 

  I am having a problem with autoload and subsequently resolving the
functions. Here are the particulars.

(kevins@drkstr)(zsh:434)% echo $ZSH_VERSION 
3.1.2
(kevins@drkstr)(zsh:435)% uname -a
OSF1 drkstr.lkg.dec.com V4.0 375 alpha

When I try to resolve an autoload function zsh core dumps. Here is the
setup procedure:

FPATH=${HOME}/bin/functions
{whence replace && unalias replace} >& /dev/null
autoload replace

The function replace is a simple script to replace a symbolic link
with the referenced file. However, the script/function is irrelevant
it cores on any autoload(ed) name. I built zsh in debug so I could get
a relevant core file. 


(kevins@drkstr)(zsh:439)% ./zsh
(kevins@drkstr)(zsh:203)% autoload
undefined mere () { }
undefined replace () { }
(kevins@drkstr)(zsh:203)% replace symlink
zsh: 17792 segmentation fault (core dumped)  ./zsh
(kevins@drkstr)(zsh:440)% gdb ./zsh core
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (alpha-dec-osf4.0), Copyright 1996 Free Software Foundation, Inc...
Core was generated by `zsh'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/shlib/libc.so...done.
#0  0x12002fe94 in execautofn (cmd=0x14002f140) at exec.c:2494
2494        List l = getfpfunc(shf->nam);
(gdb) bt
#0  0x12002fe94 in execautofn (cmd=0x14002f140) at exec.c:2494
#1  0x12002c4dc in execcmd (cmd=0x14002f140, input=0, output=0, how=2, last1=2)
    at exec.c:1650
#2  0x120028728 in execpline2 (pline=0x14002f128, how=2, input=0, output=0, 
    last1=0) at exec.c:807
#3  0x120027b8c in execpline (l=0x14002f108, how=2, last1=0) at exec.c:653
#4  0x1200275fc in execlist (list=0x14002f0f0, dont_change_job=1, exiting=0)
    at exec.c:533
#5  0x1200305ec in doshfunc (list=0x14003c360, doshargs=0x14002f050, flags=64, 
    noreturnval=0) at exec.c:2583
#6  0x12002fe10 in execshfunc (cmd=0x14002f020, shf=0x140087ae0) at exec.c:2477
#7  0x12002c67c in execcmd (cmd=0x14002f020, input=0, output=0, how=2, last1=2)
    at exec.c:1686
#8  0x120028728 in execpline2 (pline=0x14002f0a0, how=2, input=0, output=0, 
    last1=0) at exec.c:807
#9  0x120027b8c in execpline (l=0x14002f000, how=2, last1=0) at exec.c:653
#10 0x1200275fc in execlist (list=0x14002f0b8, dont_change_job=0, exiting=0)
    at exec.c:533
#11 0x120047664 in loop (toplevel=1) at init.c:72
#12 0x12008f028 in main (argc=1, argv=0x11ffff5e8) at main.c:81
(gdb) p shf
$1 = (struct shfunc *) 0x0
(gdb) p *cmd
$3 = {
  ntype = 1129668867, 
  type = 13, 
  flags = 0, 
  lineno = 0, 
  u = {
    list = 0x14002f288, 
    forcmd = 0x14002f288, 
    casecmd = 0x14002f288, 
    ifcmd = 0x14002f288, 
    whilecmd = 0x14002f288, 
    pline = 0x14002f288, 
    cond = 0x14002f288, 
    autofn = 0x14002f288, 
    generic = 0x14002f288
  }, 
  args = 0x14002f298, 
  redir = 0x14002f2b8, 
  vars = 0x14002f2a8
}
(gdb) p *cmd->u.autofn 
$4 = {
  ntype = 1090519051, 
  shf = 0x0
}

I tried looking through the code somewhat but I am really unfamiliar
with it. I am hoping one of the zsh-workers can enlighten me to what I
am doing wrong. I am sure that I have not set up something quite right
but I am at a loss. I have read through all the information I can
find. I have been using zsh for many years. All of my functions and
scripts I have loaded into a large (getting very large) file I load in
at login time. I would like to break up that file and use autoload and
fpath can you help me out. 

 -Kevin 


                 reply	other threads:[~1997-12-02 23:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9712022322.AA17913@drkstr.lkg.dec.com \
    --to=kevins@drkstr.lkg.dec.com \
    --cc=zsh-users@math.gatech.edu \
    /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).