zsh-workers
 help / color / mirror / code / Atom feed
* Re:  Problem with autoload.
@ 1997-12-03  7:25 Sven Wischnowsky
  1997-12-22  6:19 ` zsh release anyone? (Was: Problem with autoload.) Geoff Wing
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 1997-12-03  7:25 UTC (permalink / raw)
  To: zsh-workers


Kevin Sullivan wrote:

> 
> 
> 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:
> 
> ...
> 
> 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. 
> 

I sent a patch for this some time ago, here is the old message:

----------

Hi

Dunno if there was a patch for this before...

In 3.1.2 autoloaded functions are implemented by making them
(internally) functions which load themselves. For this there is a new
struct autofn and a corresponding description in utils.c.
This descriptions says that the struct has one extra integer that
should be copied in dupstruct2(). But in fact there is a pointer which
should be copied directly. Due to sizeof(int) != sizeof(Shfunc) on an
Alpha this doesn't copy the pointer, leaving it zero, causing a SEGV
later on.
The patch below is probably a bit simple (-minded), but it works.

Bye
 Sven

*** utils.c.old	Wed Oct  8 10:48:31 1997
--- utils.c	Wed Oct  8 09:04:20 1997
***************
*** 1668,1674 ****
--- 1668,1678 ----
      NT_SET(N_IF, 0, NT_NODE | NT_ARR, NT_NODE | NT_ARR, 0, 0),
      NT_SET(N_WHILE, 1, NT_NODE, NT_NODE, 0, 0),
      NT_SET(N_VARASG, 1, NT_STR, NT_STR, NT_STR | NT_LIST, 0),
+ #if SIZEOF_LONG == 8
+     NT_SET(N_AUTOFN, 3, 0, 0, 0, 0),
+ #else
      NT_SET(N_AUTOFN, 1, 0, 0, 0, 0),
+ #endif
  };
  
  /**/


----------

Zoltan, are you currently in the process of putting together a 3.1.3?
(Or am I the only one who hesitates to build patches due to a missing
definition of `official patches' or `patches that will go into the
next release'?)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* zsh release anyone? (Was: Problem with autoload.)
  1997-12-03  7:25 Problem with autoload Sven Wischnowsky
@ 1997-12-22  6:19 ` Geoff Wing
  0 siblings, 0 replies; 2+ messages in thread
From: Geoff Wing @ 1997-12-22  6:19 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky <wischnow@informatik.hu-berlin.de> typed:
:Zoltan, are you currently in the process of putting together a 3.1.3?
:(Or am I the only one who hesitates to build patches due to a missing
:definition of `official patches' or `patches that will go into the
:next release'?)

I doubt you're the only one hestitating though I don't have anything to
submit that I know about since I don't know what's gone in and what hasn't.
It's been 6 months since 3.1.2-beta and it'd be great to have an official
baseline again to diff against, and also get the `fixes' I've missed patching
into my tree, which means that I, at least, haven't tested all of them.
-- 
Geoff Wing [gcw@pobox.com]                         Phone    : +61-3-9818 2977
 Technical Manager: PrimeNet Computer Consultants  Facsimile: +61-3-9818 5155
 <URL:http://www.primenet.com.au/>                 Mobile   : 0412 162 441


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

end of thread, other threads:[~1997-12-22  6:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-03  7:25 Problem with autoload Sven Wischnowsky
1997-12-22  6:19 ` zsh release anyone? (Was: Problem with autoload.) Geoff Wing

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).