odd segfault with my c program using cygwin 1.7

mike marchywka marchywka@gmail.com
Wed Dec 2 13:37:00 GMT 2009


On 12/2/09, jeffunit <jeff@jeffunit.com> 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, adding the "-g" flag, then run it under gdb,
> and
> when the segfault happens, use the "bt" command to get a backtrace and see
> where you are.
>
>      cheers,
>        DaveK
>
> It runs correctly under the debugger, without core dump.
> I am 99.9% sure the bug is outside my program. As I said,
> I have run it successfully with cygwin 1.5, and linux.
>
> I cannot imagine commenting/uncommenting the print statement
> changing the program execution. I suspect a library resource
> issue causing the segfault.
>

Memory corruption is tricky, right up there with threading problems.
This loop seems pretty self contained, what else are you doing prior
to that? An investigation along these lines doesn't rule out a library
problem but does help find more possibilities. Somtimes linking
with bad libs can cause odd behaviours- have you tried to catch
the fault? I found a build problem by an inability to catch "anything."

> As others have pointed out, I am pretty sure it is not going
> out of bounds on the array.
>
> thanks,
> jeff
>
>
>
>
>
>
>
> --
> 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



More information about the Cygwin mailing list