zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: aliases+=(foo 'echo bar') crash
Date: Wed, 23 Jul 2014 20:04:17 -0700	[thread overview]
Message-ID: <140723200417.ZM5161@torch.brasslantern.com> (raw)
In-Reply-To: <140723183740.ZM5114@torch.brasslantern.com>

On Jul 23,  6:37pm, Bart Schaefer wrote:
}
} The bad values in *pm come from here:
} 
}     857         oldpm = (Param) (paramtab == realparamtab ?
}     858                          gethashnode2(paramtab, name) :
}     859                          paramtab->getnode(paramtab, name));
} 
} (where paramtab != realparamtab).  That's as far as I've gotten.

So ->getnode() there is getpmralias() which calls getalias() which
allocates everything on the heap.

When arrhashsetfn() tries to replace the value returned from getalias(),
kaboom.

The problem may be that the aliases hash has been autoloaded from the
zsh/parameter module AFTER the flow of control has already passed the
point of deciding what function to call to perform the assignment, and
so is using the generic hash function instead of the special functions
for setting aliases.


  reply	other threads:[~2014-07-24  3:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 16:09 Stephane Chazelas
2014-07-23 16:52 ` Peter Stephenson
2014-07-24  1:37   ` Bart Schaefer
2014-07-24  3:04     ` Bart Schaefer [this message]
2014-07-24  5:45       ` [PATCH] " Bart Schaefer
2014-07-24  9:47         ` Peter Stephenson
2014-07-24 15:29           ` Bart Schaefer

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=140723200417.ZM5161@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).