From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25723 invoked by alias); 8 Jan 2017 19:34:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40307 Received: (qmail 1387 invoked from network); 8 Jan 2017 19:34:01 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f54.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.54):SA:0(-0.0/5.0):. Processed in 1.91196 secs); 08 Jan 2017 19:34:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.54 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=9Mpthd4IhboTNa6z9v+BjUCmARlJRf3UtRS00NZVnfI=; b=TD1PNW90WiDaXAZmn8Lbwee6h1Bs5DtJTYj18DzRachQemg6dkIm91d0i9qZRoFnmj PcnJqbDGoP1AWAULuiz05ufA0qXqfaq6xlewErp0QSN8vemUQ3+0gmgGMMTxjo/FwiIF uOVie797Wqy9YTCYCZYiZilpGwfxOwcy6i8umzzc+k+5x0wWio3qZV8nRcuWAHJmOsn4 kevJy55NxY+VxeqQoleyyyMY4TdTAHzaY4mGmQRsD2L/rzT6yk5oV8GMFO0FtrLcNMf6 uRbq1hQYrhN3/M7xqdrdgwwaGknxp39IDoU3vNC/K1VP3JGDIHiqSyUzVM1ByMrpD1ko tOdg== X-Gm-Message-State: AIkVDXIhrqz/4jWfEIMq8hUIGxnBTjYdlRPXxT+o/vY9bt6CgILgfoBGblrfW1QcwID6/Q== X-Received: by 10.31.197.195 with SMTP id v186mr30201308vkf.84.1483904032297; Sun, 08 Jan 2017 11:33:52 -0800 (PST) From: Bart Schaefer Message-Id: <170108113358.ZM9462@torch.brasslantern.com> Date: Sun, 8 Jan 2017 11:33:58 -0800 In-Reply-To: <20170106172541.GA14113@fujitsu.shahaf.local2> Comments: In reply to m0viefreak "[PATCH] isearch: do not use PAT_STATIC since we call zle hooks" (Jan 6, 5:25pm) References: <20170106172541.GA14113@fujitsu.shahaf.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 ...