A segfault is caused when you write to memory you didn't allocate. Usually what happens is that you run off the end of a string (missing null) or mis-calc an array index (<= on a for loop that should've had a <) and hit memory that isn't part of the array.

Often when it happens, you're overwriting memory that your program has already allocated for another variable. When that's the case, it doesn't cause a seg fault, but can cause strange and varying bugs.

With errors like that, changing compile options will often affect how the bug manifests itself. Since optimizing or profiling adds extra code inbetween yours, writting to stray memory will very likely cause different problems than it did before.

I had problems like that when compiling stuff for my TiVo and didn't have much trouble getting efence compiled for it. If you want a hand with that, I can try to compile efence for the empeg.
_________________________
--The Amigo