Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Sep 2006 02:51:56 +0200
From:      Ivan Voras <ivoras@fer.hr>
To:        freebsd-stable@freebsd.org
Subject:   Re: malloc(): warning: recursive call
Message-ID:  <edftb9$slo$1@sea.gmane.org>
In-Reply-To: <1D1B7B79-6BF0-4316-BC96-4287669BF778@lassitu.de>
References:  <1D1B7B79-6BF0-4316-BC96-4287669BF778@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Stefan Bethke wrote:

> mail in malloc(): warning: recursive call
> Cosmic rays? Anything I could try to find the cause?

I know what it is, but you won't going to like it. As far as I
understand this happens when a process gets a signal in the middle of
using malloc(), and the signal handler also uses malloc(). The solution
would be not to use malloc() in a signal handler, but this is tricky
since unknown code can use malloc() (e.g. printf()?).

This appears to be "undefined" by standards, but GNU libc allows it
because it makes sense, while phkmalloc dissallows it, causing (me)
considerable problems with certain applications. I hope jemalloc is
better in this respect :)

I don't know how it happened in mail(1) if mail(1) is the FreeBSD version.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?edftb9$slo$1>