delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/02/07:03:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4B165777.2060201@cs.umass.edu>
Date: Wed, 02 Dec 2009 07:03:03 -0500
From: Eliot Moss <moss AT cs DOT umass DOT edu>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: odd segfault with my c program using cygwin 1.7
References: <20071202162155 DOT XNVY20104 DOT mta10 DOT adelphia DOT net AT dual-xeon DOT weasel DOT com> <20091202013344138 DOT XZWP20286 AT cdptpa-omta02 DOT mail DOT rr DOT com> <416096c60912012235h2e5290c3q4ad720134d4f0422 AT mail DOT gmail DOT com>
In-Reply-To: <416096c60912012235h2e5290c3q4ad720134d4f0422@mail.gmail.com>
X-IsSubscribed: yes
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

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

- Raw text -


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