From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31170 invoked by alias); 2 Dec 2009 12:03:13 -0000 Received: (qmail 31043 invoked by uid 22791); 2 Dec 2009 12:03:12 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from csmail.cs.umass.edu (HELO csmail.cs.umass.edu) (128.119.240.177) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Dec 2009 12:03:05 +0000 Received: from [192.168.0.7] (c-71-233-223-205.hsd1.ma.comcast.net [71.233.223.205]) by csmail.cs.umass.edu (Postfix) with ESMTPSA id 207255000015311296; Wed, 2 Dec 2009 07:03:04 -0500 (EST) Message-ID: <4B165777.2060201@cs.umass.edu> Date: Wed, 02 Dec 2009 12:03:00 -0000 From: Eliot Moss User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: odd segfault with my c program using cygwin 1.7 References: <20071202162155.XNVY20104.mta10.adelphia.net@dual-xeon.weasel.com> <20091202013344138.XZWP20286@cdptpa-omta02.mail.rr.com> <416096c60912012235h2e5290c3q4ad720134d4f0422@mail.gmail.com> In-Reply-To: <416096c60912012235h2e5290c3q4ad720134d4f0422@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-12/txt/msg00099.txt.bz2 Andy Koppe wrote: > 2009/12/2 jeffunit: >> >> When compiled with >> gcc cal.c -o cal >> and run with >> cal 2009 >> I get a segmentation fault. >> When I uncomment line 62, the program runs successfully. > > It's the line after that that has the bug: it's writing to index 432 > of a 432-element array. I disagree -- I uncommented the line to verify, but it's clear that j<6*72 keeps j within the array. The program compiles and runs fine in my up-to-date cygwin 1.7 setup under Windows 7. There must be something else going on for the OP. Best wishes -- Eliot Mos -- 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