From owner-freebsd-threads@FreeBSD.ORG Thu May 19 07:26:33 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E010816A4CE for ; Thu, 19 May 2005 07:26:33 +0000 (GMT) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 235CF43D82 for ; Thu, 19 May 2005 07:26:33 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: from beastie.frontfree.net (unknown [219.239.99.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id DAFB4EB35DD for ; Thu, 19 May 2005 15:26:29 +0800 (CST) Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 83CA3139D91; Thu, 19 May 2005 15:26:20 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06856-18; Thu, 19 May 2005 15:26:13 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 84DA8132C1A; Thu, 19 May 2005 15:26:12 +0800 (CST) Date: Thu, 19 May 2005 15:26:12 +0800 From: Xin LI To: Ady_Li@trendmicro.com.cn Message-ID: <20050519072612.GA7922@frontfree.net> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #15: Wed Dec 15 10:43:16 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: malloc recursive X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2005 07:26:34 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 17, 2005 at 02:17:25PM +0800, Ady_Li@trendmicro.com.cn wrote: > when i wrote a multi-pthread program in fbsd,=0D > at the first few second, it would core out with "malloc(): error: malloc= recursive" or=0D > "free(): error: malloc recursive", there are more similar question in th= e maillist,=0D > 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? Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCjD+U/cVsHxFZiIoRAi8/AJ0X8DWeXwmD3tFNXqcr5YthPRwKTQCeLrte eLHKgDusANFoWRQJwcCL+UQ= =FUEn -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--