From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6fc45feb for ; Mon, 16 Dec 2019 04:01:24 +0000 (UTC) Received: (qmail 8938 invoked by alias); 16 Dec 2019 04:01:19 -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: List-Unsubscribe: X-Seq: 45042 Received: (qmail 29571 invoked by uid 1010); 16 Dec 2019 04:01:19 -0000 X-Qmail-Scanner-Diagnostics: from wout1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(64.147.123.24):SA:0(-2.6/5.0):. Processed in 0.728579 secs); 16 Dec 2019 04:01:19 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtgedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjfgesthdttddttdervdenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cukfhppeejledrudektddrheejrdduudelnecurfgrrhgrmhepmhgrihhlfhhrohhmpegu rdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgenucevlhhushhtvghrufhiiigvpe du X-ME-Proxy: Date: Mon, 16 Dec 2019 04:00:43 +0000 From: Daniel Shahaf To: Peter Stephenson Cc: zsh-workers@zsh.org, dana Subject: Re: =?iso-8859-1?B?VFKgOiBSZaA=?= =?iso-8859-1?Q?=3A?= [BUG] Crash due to malloc call in signal handler Message-ID: <20191216040043.rnhdqwmxni5ucpos@tarpaulin.shahaf.local2> References: <569822988.994307929.1576256973462.JavaMail.root@zimbra62-e11.priv.proxad.net> <1576258224.5214.31.camel@samsung.com> <5bd41b45eaf3d745547d1091f4fe22645fd2e8e5.camel@ntlworld.com> <5768d5ca6d1e70c3b7c58b87ca99410f6306a584.camel@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5768d5ca6d1e70c3b7c58b87ca99410f6306a584.camel@ntlworld.com> User-Agent: NeoMutt/20170113 (1.7.2) Peter Stephenson wrote on Sun, Dec 15, 2019 at 19:06:43 +0000: > On Sat, 2019-12-14 at 12:32 +0000, Peter Stephenson wrote: > > On Fri, 2019-12-13 at 21:08 +0000, Peter Stephenson wrote: > > > On Fri, 2019-12-13 at 17:30 +0000, Peter Stephenson wrote: > > > > I think the intention here is to make sure we're not blocking for a long > > > > time in this function, but if fgetc() is doing memory allocation we're > > > > going to have to put that in the signal blocking. However, if the input > > > > itself blocks in fgetc() that's going to be a problem. The fix might be > > > > not to fdopen() the input file, but just read into a buffer with > > > > read(). > > > > > > This would look like the following, which is passing tests... > > > > Slight update to close the file descriptor and to document the arguments > > of the function. > > I've committed this --- and as it's potentially serious we should let it > get a bit of testing and then get it into the release --- but as I've > still had no comments further examination is still welcome. I'm installing it as my day-to-day shell right now. Does this warrant a 5.7.1-test-2 before 5.8?