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