X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FRT_APPROV,RCVD_IN_DNSWL_LOW,TW_CG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <4E68DB48.3050906@gmail.com> Date: Thu, 08 Sep 2011 17:12:08 +0200 From: Marco atzeri User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: debugging SIGSEV on pclose References: <4E64BE96 DOT 5020107 AT gmail DOT com> <4E68CE13 DOT 6010106 AT gmail DOT com> <20110908142702 DOT GA28918 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20110908142702.GA28918@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 9/8/2011 4:27 PM, Christopher Faylor wrote: > On Thu, Sep 08, 2011 at 04:15:47PM +0200, Marco atzeri wrote: >> Question: >> is a mistake in pclose to assume that fh could be invalid > > I'm not sure what you're asking here. It's not a mistake to assume that > pclose is being passed a valid fp. Linux also crashes if the fp is > closed twice. Just as I noticed earlier on syscall.cc a defensive approuch ----------------------------------------------- close_all_files (bool norelease) { cygheap->fdtab.lock (); semaphore::terminate (); fhandler_base *fh; HANDLE h = NULL; for (int i = 0; i < (int) cygheap->fdtab.size; i++) if ((fh = cygheap->fdtab[i]) != NULL) { ------------------------------------------------ > >> or something is just trashing cygheap->fdtab ? > > Who knows? strace should show if the fp is closed twice. > > cgf correct, it looks I have two close in excess for fd 5 and 6 Thanks Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple