From owner-freebsd-stable@FreeBSD.ORG Mon Sep 4 06:22:11 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 028D916A4DD for ; Mon, 4 Sep 2006 06:22:11 +0000 (UTC) (envelope-from sean@gothic.net.au) Received: from visi.gothic.net.au (visi.gothic.net.au [203.206.208.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id C111143D46 for ; Mon, 4 Sep 2006 06:22:04 +0000 (GMT) (envelope-from sean@gothic.net.au) Received: from localhost (localhost [127.0.0.1]) by visi.gothic.net.au (Postfix) with ESMTP id 7A4A126A43; Mon, 4 Sep 2006 06:22:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at gothic.net.au Received: from localhost ([127.0.0.1]) by localhost (visi.gothic.net.au [127.0.0.1]) (amavisd-new, port 10026) with SMTP id yYCdCpAcxy9i; Mon, 4 Sep 2006 16:21:57 +1000 (EST) Received: from [10.99.34.33] (not.gothic.net.au [203.206.208.86]) by visi.gothic.net.au (Postfix) with ESMTP id EBEF926A2E; Mon, 4 Sep 2006 06:21:56 +0000 (UTC) In-Reply-To: References: <1D1B7B79-6BF0-4316-BC96-4287669BF778@lassitu.de> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4BEC2251-7FA7-4BC4-A7C8-3F7618758290@gothic.net.au> Content-Transfer-Encoding: 7bit From: Sean Winn Date: Mon, 4 Sep 2006 16:21:55 +1000 To: Ivan Voras X-Mailer: Apple Mail (2.752.2) Cc: freebsd-stable@freebsd.org Subject: Re: malloc(): warning: recursive call X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Sep 2006 06:22:11 -0000 On 04/09/2006, at 10:51 AM, Ivan Voras wrote: > 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()?). > It's not tricky. man sigaction documents the functions that are async- signal safe. Anything not listed there (such as printf) and you're on your own. There's some FreeBSD extensions, but most of this list is specified by the ANSI C standard, or POSIX standards. > 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. > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable- > unsubscribe@freebsd.org" >