Re: odd segfault with my c program using cygwin 1.7

2009-12-02 Thread mike marchywka
On 12/2/09, jeffunit wrote: > > 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, addi

Re: odd segfault with my c program using cygwin 1.7

2009-12-02 Thread jeffunit
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, a

Re: odd segfault with my c program using cygwin 1.7

2009-12-02 Thread mike marchywka
On 12/2/09, Eliot Moss 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

Re: odd segfault with my c program using cygwin 1.7

2009-12-02 Thread Eliot Moss
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 u

Re: odd segfault with my c program using cygwin 1.7

2009-12-02 Thread Dave Korn
Andy Koppe wrote: > 2009/12/2 Dave Korn: >> Andy Koppe wrote: >>> 2009/12/2 jeffunit: My program ran fine under cygwin 1.5 as well as many versions of linux including mandriva 2009, mandriva 2009.1 and mandriva 2010.0 When compiled with gcc cal.c -o cal and run with >>

Re: odd segfault with my c program using cygwin 1.7

2009-12-01 Thread Andy Koppe
2009/12/2 Dave Korn: > Andy Koppe wrote: >> 2009/12/2 jeffunit: >>> My program ran fine under cygwin 1.5 as well as many versions of linux >>> including >>> mandriva 2009, mandriva 2009.1 and mandriva 2010.0 >>> >>> When compiled with >>> gcc cal.c -o cal >>> and run with >>> cal 2009 >>> I get a s

Re: odd segfault with my c program using cygwin 1.7

2009-12-01 Thread Dave Korn
Andy Koppe wrote: > 2009/12/2 jeffunit: >> My program ran fine under cygwin 1.5 as well as many versions of linux >> including >> mandriva 2009, mandriva 2009.1 and mandriva 2010.0 >> >> When compiled with >> gcc cal.c -o cal >> and run with >> cal 2009 >> I get a segmentation fault. >> When I unco

Re: odd segfault with my c program using cygwin 1.7

2009-12-01 Thread Andy Koppe
2009/12/2 jeffunit: > My program ran fine under cygwin 1.5 as well as many versions of linux > including > mandriva 2009, mandriva 2009.1 and mandriva 2010.0 > > 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 run

odd segfault with my c program using cygwin 1.7

2009-12-01 Thread jeffunit
My program ran fine under cygwin 1.5 as well as many versions of linux including mandriva 2009, mandriva 2009.1 and mandriva 2010.0 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. I have had other pro