Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
- X-seq: zsh-workers 40307
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks
- Date: Sun, 8 Jan 2017 11:33:58 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=9Mpthd4IhboTNa6z9v+BjUCmARlJRf3UtRS00NZVnfI=; b=IxnFxAbzfupkt+8kINozAXYnaay4Jx0vrdO94dAOexmINE5dh8jyyC25q1F0qSZOLc 6lYQBhhB0WUqFxNwMMTk4dGWX051Y+aNooLkjlHX22xwNS6JfuUDv45THqvuiP7Ihe8O kpl4sLY9mJ2K4xPYPpoekf2IsH0ETrMF+Whrzoa+k6GHjLviEVc/HEJLgHLUCPNzQEXr zFMNuWS0zdvshOn3jC7qRHdKeUwJB+uMRvYNEn27C9rp1KIm8z2E368krDzLW7B3GnfE 3OfvieaX9J7lyDUdVMlz1d8TBaySYxtWMSogqoxONa9nzT17MMy/U4hGwGWGdzlqOsRz 38SA==
- In-reply-to: <20170106172541.GA14113@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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 ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author