zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Complicated segfault regression
Date: Sun, 5 Jul 2015 12:15:59 +0100	[thread overview]
Message-ID: <20150705121559.365e17a4@ntlworld.com> (raw)
In-Reply-To: <20150705120616.40880b98@ntlworld.com>

On Sun, 5 Jul 2015 12:06:16 +0100
Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Fri, 3 Jul 2015 23:11:59 +0100
> Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> > n->pop has no dcoumentation whatsoever, but the calculation associated
> > with it in 5.0.7 is to do with how much state->pc gets incremented for
> > each case pattern set, not coutning the string.  Why?  No idea.  The
> > calculation has changed, and now looks like the following.
> 
> I've come to the conclusion this has always been wrong, or at least
> confusingly inaccurate.  I think it sort-of worked because the
> comparison landed in the right target area, just not at the right point.

Having said that: the penny has now dropped.  I think it was right, just
incredibly obscure (the equivalent execcase() code was equally obscure
before I tidied it up).

I was wondering why it didn't count 1 for the string expression in the
case (there was only one back then).  But it did... it then subtracted
it off again, because the skip starts at the *next* value of pc after
the one that contained the skip count.  (I've had to subtract that
explicitly --- actually, I simiply remember the next PC as the most
logical way of avoiding funny offsets.)  Then the skip count in the old
case agrees with what the expression was doing, and using the skip count
instead is equivalent in both cases.

So I think everything now adds up.

pws


      reply	other threads:[~2015-07-05 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 21:36 Martijn Dekker
2015-07-03  3:28 ` Bart Schaefer
2015-07-03 11:35 ` Peter Stephenson
2015-07-03 12:29   ` Martijn Dekker
2015-07-03 13:44     ` Peter Stephenson
2015-07-03 17:52       ` Martijn Dekker
2015-07-03 22:11       ` Peter Stephenson
2015-07-04 10:03         ` Peter Stephenson
2015-07-05 11:06         ` Peter Stephenson
2015-07-05 11:15           ` Peter Stephenson [this message]

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=20150705121559.365e17a4@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).