(E-Mail Removed) (Måns Rullgård) writes:
> "Marcia Hon" <(E-Mail Removed)> writes:
> > (gdb) bt
> > #0 0x0a6e6962 in ?? ()
Note that this is ASCII: "\nnib", doing "x/s $esp" may reveal the
rest of the string which overflowed its buffer.
> You have a corrupted stack.
Most definitely.
> Look for buffer overflows in automatically allocated memory.
Yes. I would bet 10:1 that this is a simple strcpy() into an
automatic char array that is too small.
> Another typical cause is freeing automatic memory.
That would cause a SIGSEGV *in* malloc/free, not a jump to ASCII.
> It could also be caused by using an uninitialized pointer.
Or it could be that.
> A memory debugger like Electric Fence or (for PC) valgrind
> is useful for finding such bugs.
EFence will not help with this kind of bug at all, valgrind might
(if this is an uninitialized pointer, but not otherwize).
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.