delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/02/08:23:19

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00
X-Spam-Check-By: sourceware.org
Date: Wed, 02 Dec 2009 05:23:10 -0800
To: cygwin AT cygwin DOT com
From: jeffunit <jeff AT jeffunit DOT com>
Subject: Re: odd segfault with my c program using cygwin 1.7
Mime-Version: 1.0
Message-Id: <20091202132306344.YUMZ8989@cdptpa-omta03.mail.rr.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

  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.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019