zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Alpha and 3.1.2
Date: Wed, 8 Oct 1997 10:54:38 +0200 (MET DST)	[thread overview]
Message-ID: <199710080854.KAA21930@beta.informatik.hu-berlin.de> (raw)


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
  };
  
  /**/


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


                 reply	other threads:[~1997-10-08  9:06 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=199710080854.KAA21930@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@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).