This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: odd segfault with my c program using cygwin 1.7


On 12/2/09, Eliot Moss <moss@cs.umass.edu> wrote:
> 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.
>

Does OP get a consistent failure mode with different compiler options?

> 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
>
>


-- 

marchywka@gmail.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@hotmail.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@yahoo.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]