From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
Date: Sun, 8 Jan 2017 11:33:58 -0800 [thread overview]
Message-ID: <170108113358.ZM9462@torch.brasslantern.com> (raw)
In-Reply-To: <20170106172541.GA14113@fujitsu.shahaf.local2>
On Jan 6, 5:25pm, m0viefreak wrote:
} Subject: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
}
} Using PAT_STATIC, any of the functions called in the hook that make
} use of patterns, implicitly change the pattern we use in the
} isearch loop. In the best case this results in pattern-not-found,
} in the worst case we get a dump.
This indicates that PAT_STATIC is unsafe anywhere signal queuing is
NOT in effect, because a trap handler could invoke pattern matching
in the same way.
PAT_STATIC already causes the compiled pattern to be placed on the heap,
so we could introduce a PAT_HEAPDUP that works like PAT_ZDUP except
there would be no need to explicity freepatprog(). Or we could look
for uses of PAT_STATIC and wrap them in queue_signals(), if the scope
is sufficiently narrow.
Either way we have to track down and examine every use of PAT_STATIC,
so ...
next prev parent reply other threads:[~2017-01-08 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 17:25 m0viefreak
2017-01-06 17:35 ` Bart Schaefer
2017-01-08 19:33 ` Bart Schaefer [this message]
2017-01-08 19:40 ` Peter Stephenson
2017-01-28 19:02 ` Bart Schaefer
2017-01-28 19:15 ` Peter Stephenson
2017-01-28 19:39 ` Bart Schaefer
2017-01-28 19:47 ` Peter Stephenson
2017-01-29 0:01 ` Bart Schaefer
2017-01-29 16:24 ` Bart Schaefer
2017-01-09 1:35 ` Daniel Shahaf
2017-01-09 1:48 ` Bart Schaefer
2017-01-11 2:01 ` Fwd: " 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=170108113358.ZM9462@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).