From owner-freebsd-current Sat Mar 25 12:36: 8 2000 Delivered-To: freebsd-current@freebsd.org Received: from sharmas.dhs.org (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id E264537B6D1 for ; Sat, 25 Mar 2000 12:36:02 -0800 (PST) (envelope-from adsharma@sharmas.dhs.org) Received: (from adsharma@localhost) by sharmas.dhs.org (8.9.3/8.9.3) id MAA10653; Sat, 25 Mar 2000 12:35:55 -0800 Date: Sat, 25 Mar 2000 12:35:55 -0800 From: Arun Sharma To: "Jordan K. Hubbard" Cc: Poul-Henning Kamp , FreeBSD Current Subject: Re: malloc.conf Message-ID: <20000325123555.B10626@sharmas.dhs.org> References: <20000325120159.A10568@sharmas.dhs.org> <4703.954015110@zippy.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <4703.954015110@zippy.cdrom.com>; from Jordan K. Hubbard on Sat, Mar 25, 2000 at 12:11:50PM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Mar 25, 2000 at 12:11:50PM -0800, Jordan K. Hubbard wrote: > > I did and created malloc.conf as documented there. And things were > > fine after that. Wouldn't it be better if the build process created > > a default /etc/malloc.conf ? > > It's purely an optional file; one doesn't need to be installed by > default in order for things to behave as expected. Consider it > a debugging feature. You're right. It works for the default case. I was doing an unsupported operation: experimenting with rfork and the clone() call from Linuxthreads port. However, the mere presence of clone() in the same executable makes malloc unhappy. 8668 test CALL readlink(0x280f1114,0xbfbff7b8,0x3f) 8668 test NAMI "/etc/malloc.conf" 8668 test RET readlink -1 errno 2 No such file or directory 8668 test CALL sigprocmask(0x1,0x28060000,0x28060010) 8668 test RET sigprocmask 0 8668 test CALL sigprocmask(0x3,0x28060010,0) 8668 test RET sigprocmask 0 8668 test PSIG SIGSEGV SIG_DFL 8668 test NAMI "test.core" The program is: #include #include #include #include #include main() { int status; pid_t pid; void *stack; stack = malloc(4096); } It works fine stand alone. But when linked with some other stuff, it core dumps. If I create /etc/malloc.conf, it's ok. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message