From owner-freebsd-hackers Fri Sep 19 00:40:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA21866 for hackers-outgoing; Fri, 19 Sep 1997 00:40:39 -0700 (PDT) Received: from citadel.cdsec.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA21859 for ; Fri, 19 Sep 1997 00:40:31 -0700 (PDT) Received: (from nobody@localhost) by citadel.cdsec.com (8.8.5/8.6.9) id JAA22308; Fri, 19 Sep 1997 09:45:43 +0200 (SAT) Received: by citadel via recvmail id 22275; Fri Sep 19 09:45:08 1997 by gram.cdsec.com (8.8.5/8.8.5) id JAA01763; Fri, 19 Sep 1997 09:30:59 +0200 (SAT) From: Graham Wheeler Message-Id: <199709190730.JAA01763@cdsec.com> Subject: Re: Bug in malloc/free To: peter@spinner.dialix.com.au (Peter Wemm) Date: Fri, 19 Sep 1997 09:30:59 +0200 (SAT) Cc: hackers@freebsd.org In-Reply-To: <199709190459.MAA07378@spinner.dialix.com.au> from "Peter Wemm" at Sep 19, 97 12:59:33 pm X-Mailer: ELM [version 2.4 PL25-h4.1] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > By coincidence I *may* have seen a bug similar to Graham's last night... > > I'm using 3.0 current ( circa. Aug 08 ). > > > > I built `ddd-2.1.1.tar.gz', found in /pub/FreeBSD/distfiles which is a > > largely C++ interface for gdb and others. Unfortunately, when I tried to > > run it, it gobbled memory until it choked. I tried a second time, this > > time killing it with CTRL-C and observed: > > > > ^Cddd in malloc(): warning: recursive call. > > Virtual memory exceeded in `new' > > > > After reading Graham's thread I relinked it against libgnumalloc, and low > > and behold it works like a charm ! > > > > Does this point to an incompatibility problem between phkmalloc and g++ > > compiled code ? > > Hmm, this particular thing sounds like a signal recursion problem.. That's exactly what one of my bugs was. I was doing memory allocation from within a SIGCHLD handler which caused this problem. That was fixed (about Tuesday) and got rid of the `recursive call' problem, but hasn't got rid of the (apparent) malloc circular list problem. It is this latter problem that is proving tricky now, and which seems to have disappeared after linking with libmalloc_d. -- Dr Graham Wheeler E-mail: gram@cdsec.com Citadel Data Security Phone: +27(21)23-6065/6/7 Internet/Intranet Network Specialists Mobile: +27(83)-253-9864 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Data Security Products WWW: http://www.cdsec.com/