X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20091202132306344.YUMZ8989@cdptpa-omta03.mail.rr.com> References: <20091202132306344 DOT YUMZ8989 AT cdptpa-omta03 DOT mail DOT rr DOT com> Date: Wed, 2 Dec 2009 08:37:15 -0500 Message-ID: Subject: Re: odd segfault with my c program using cygwin 1.7 From: mike marchywka To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 12/2/09, jeffunit wrote: > > Still, it could be some other overflow somewhere else; as I'd guess you > were > reasoning, that's the commonest reason for this sort of bug that crops up on > some platforms with some stack and memory layouts and not others. > > Jeff, recompile your code, adding the "-g" flag, then run it under gdb, > and > when the segfault happens, use the "bt" command to get a backtrace and see > where you are. > > cheers, > DaveK > > It runs correctly under the debugger, without core dump. > I am 99.9% sure the bug is outside my program. As I said, > I have run it successfully with cygwin 1.5, and linux. > > I cannot imagine commenting/uncommenting the print statement > changing the program execution. I suspect a library resource > issue causing the segfault. > Memory corruption is tricky, right up there with threading problems. This loop seems pretty self contained, what else are you doing prior to that? An investigation along these lines doesn't rule out a library problem but does help find more possibilities. Somtimes linking with bad libs can cause odd behaviours- have you tried to catch the fault? I found a build problem by an inability to catch "anything." > As others have pointed out, I am pretty sure it is not going > out of bounds on the array. > > thanks, > jeff > > > > > > > > -- > 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 > > -- marchywka AT gmail DOT com Mike Marchywka 586 Saint James Walk Marietta GA 30067-7165 415-264-8477 (w)<- use this 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency only marchywka AT hotmail DOT com Note: If I am asking for free stuff, I normally use for hobby/non-profit information but may use in investment forums, public and private. Please indicate any concerns if applicable. Note: hotmail is censoring incoming mail using random criteria beyond my control and often hangs my browser but all my subscriptions are here..., try also marchywka AT yahoo DOT com -- 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