From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5522 invoked by alias); 1 Oct 2014 14:53:53 -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: 33305 Received: (qmail 15713 invoked from network); 1 Oct 2014 14:53:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <141001075325.ZM5718@torch.brasslantern.com> Date: Wed, 01 Oct 2014 07:53:25 -0700 In-reply-to: <20141001100033.0e10a30c@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: zsh 5.0.6 hanged in freejob from TRAPCHLD" (Oct 1, 10:00am) References: <20140930172125.GA2703@xvii.vinc17.org> <20141001100033.0e10a30c@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: zsh 5.0.6 hanged in freejob from TRAPCHLD MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 1, 10:00am, Peter Stephenson wrote: } Subject: Re: zsh 5.0.6 hanged in freejob from TRAPCHLD } } > The stack trace seems to indicate that the problem likely originates in } > lexrestore() which calls free() directly (without the signal-safe zfree() } } The queue_signals() is presumably important. I don't see that zfree() } makes a practical difference here, though Right, I realized after hitting "send" that zfree() is only signal-safe when using zsh's mem.c malloc() replacement -- in which case free() is also a wrapper for zfree() instead of the other way around. This plus the possibility of interrupting the copy from the saved state back to the globals is the need for queue_signals() inside lexrestore(). There may be other save/restore routines that still need this treatment, I haven't yet done an audit.