What is XMALLOC and how it compares with malloc?
Rob Landley
rob at landley.net
Mon May 7 16:34:45 UTC 2007
On Sunday 06 May 2007 2:25 pm, Edward Huang wrote:
> Dear David, Mike, Kevin, etc
>
> Thank you all for quick responses. Mike and David were right, it is a
> wrapper in rdesktop.c, thanks for pointing it out. Some of the code used
> Malloc, some used Xmalloc. So I've made it consistently use xmalloc as it
> has error checking
>
> Stil getting segmentation fault, trace show it occurs upon calling malloc
>
> Could this mean something is corrupting the heap / malloc's housekeeping
> such that malloc panics?
That's most likely what's happening, yes. Could be a double free somewhere,
could be something writing outside of its' allocation. Various tools exist
to help track this sort of thing down. Valgrind and electric fence come to
mind. Haven't personally used either.
Rob
More information about the uClibc
mailing list