Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Reply-To: Cygwin List <cygwin@cygwin.com>
Message-Id: <6.1.0.6.0.20040418185329.02fbc7c8@127.0.0.1>
X-Sender: 
Date: Sun, 18 Apr 2004 18:55:49 -0400
To: Sophia C Yuditskaya <scyudits@MIT.EDU>, cygwin@cygwin.com
From: Larry Hall <cygwin-lh@cygwin.com>
Subject: Re: seg fault via cygwin1!aclcheck() ?
Cc: scyudits@MIT.EDU
In-Reply-To: <1082306435.4082af8343d24@webmail.mit.edu>
References: <1082306435.4082af8343d24@webmail.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

At 12:40 PM 4/18/2004, you wrote:
>Hi,
>
>I am running ns on cygwin, and after my program executes for a while with no
>problems, suddenly I get a seg fault with the following backtrace (in gdb):
>
>Program received signal SIGSEGV, Segmetation fault.
>0x610ab27b in random () from /usr/bin/cygwin1.dll
>(gdb) backtrace
>#0 0x610ab27b in random () from /usr/bin/cygwin1.dll
>#1 0x610550c6 in localtime_r () from /usr/bin/cygwin1.dll
>#2 0x61086751 in cygwin1!aclcheck () from /usr/bin/cygwin1.dll
>...(the rest of the trace is from my ns code)
>
>What is wrong? It seems like a permissions problem, but my code is not writing
>to a file. Although my code reads from a file, this seg fault occurs after a
>great many lines have been already read from this file. Based on the back
>trace, the seg fault does not occur at a point where the file is read anyway. 
>
>How can I fix this?


Looks like you're going to have to break out the debugger.  aclcheck() 
doesn't call localtime_r() (or anything close to it) so this leads me to 
conclude that you have a stack corruption in your program somewhere.



--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

