malloc(): error: malloc recursive

Xin LI delphij at
Thu May 19 00:26:34 PDT 2005

On Tue, May 17, 2005 at 02:17:25PM +0800, Ady_Li at wrote:
> when i wrote a multi-pthread program in fbsd,
> at the first few second, it would core out with "malloc(): error:  malloc recursive" or
> "free(): error:  malloc recursive", there are more similar question in the maillist,
> but i still do not know how to solved it.

Do you use signal handlers in your program?  I think this might happen
if you call allocation function within signal handlers, which should be
avoided.  Would you please share a piece of the code which can trigger
the situation if this does not help?

Xin LI <delphij frontfree net>
See complete headers for GPG key and other information.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-threads mailing list