From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: EMACS and valgrind Date: Sat, 24 Jan 2004 12:25:12 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <6654-Sat24Jan2004122511+0200-eliz@elta.co.il> References: <16383.8247.758985.411260@nick.uklinux.net> <9743-Sat10Jan2004143440+0200-eliz@elta.co.il> <16393.51090.62851.168340@nick.uklinux.net> <9178-Sun18Jan2004211534+0200-eliz@elta.co.il> <16396.24781.247776.602605@nick.uklinux.net> <1438-Tue20Jan2004082138+0200-eliz@elta.co.il> <16400.17585.198467.331774@nick.uklinux.net> <16401.39729.7130.20240@nick.uklinux.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1074940332 23243 80.91.224.253 (24 Jan 2004 10:32:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2004 10:32:12 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jan 24 11:32:05 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkL5B-00067t-00 for ; Sat, 24 Jan 2004 11:32:05 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkL5B-0000Du-00 for ; Sat, 24 Jan 2004 11:32:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkL2z-0002X3-SC for emacs-devel@quimby.gnus.org; Sat, 24 Jan 2004 05:29:49 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AkL2q-0002OP-DQ for emacs-devel@gnu.org; Sat, 24 Jan 2004 05:29:40 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AkL2H-0001ue-3W for emacs-devel@gnu.org; Sat, 24 Jan 2004 05:29:37 -0500 Original-Received: from [192.114.186.24] (helo=legolas.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AkL2G-0001uD-Hd for emacs-devel@gnu.org; Sat, 24 Jan 2004 05:29:04 -0500 Original-Received: from zaretski (pns03-201-163.inter.net.il [80.230.201.163]) by legolas.inter.net.il (Mirapoint Messaging Server MOS 3.3.8-GR) with ESMTP id BDR93663; Sat, 24 Jan 2004 12:29:00 +0200 (IST) Original-To: Nick Roberts X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: <16401.39729.7130.20240@nick.uklinux.net> (message from Nick Roberts on Fri, 23 Jan 2004 22:07:44 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19470 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19470 > From: Nick Roberts > Date: Fri, 23 Jan 2004 22:07:44 +0000 > > It looks like USE_LSB_TAG has moved the problem from a lisp one to one of > memory allocation. As Eli has said earlier, the valgrind team have noted that > memory debugging doesn't work with Emacs: > > doc> Programs which are known not to work are: > > doc> * emacs starts up but immediately concludes it is out of memory and > doc> aborts. Emacs has it's own memory-management scheme, but I don't > doc> understand why this should interact so badly with Valgrind. Emacs > doc> works fine if you build it to use the standard malloc/free routines. > > So I guess its not a simple problem. I think we need to bring the valgrind developer(s) on board to help debugging this. Perhaps Richard could ask him/her/them to help. valgrind sounds like a great tool for finding memory-related bugs; it'd be a pity if we couldn't find a way to use it. Note that there's a section in etc/DEBUG about building Emacs with malloc-debugging packages (most of the info there is actually based on Purify, but the name isn't mentioned because Purify is not Free Software). It's possible that some of the advice there could help with valgrind, although I wouldn't hold my breath, since valgrind inner workings are very different, AFAICT. As another note, the above citation claims that Emacs compiled with ``the standard malloc'' works fine under valgrind, but I always thought that Emacs built on GNU/Linux uses the system malloc by default, isn't that so?