From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.emacs.devel Subject: Re: please set both MALLOC_PERTURB_ and MALLOC_CHECK_ envvars Date: Sun, 29 May 2011 09:32:22 +0200 Message-ID: <87r57iq7w9.fsf@rho.meyering.net> References: <874o4fx17z.fsf@rho.meyering.net> <4DE1DD2B.5020902@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306654358 31232 80.91.229.12 (29 May 2011 07:32:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 May 2011 07:32:38 +0000 (UTC) Cc: Emacs development discussions To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 29 09:32:30 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QQaU8-00026Q-Hi for ged-emacs-devel@m.gmane.org; Sun, 29 May 2011 09:32:28 +0200 Original-Received: from localhost ([::1]:55679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQaU7-0007Yo-Pd for ged-emacs-devel@m.gmane.org; Sun, 29 May 2011 03:32:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQaU5-0007Yi-0v for emacs-devel@gnu.org; Sun, 29 May 2011 03:32:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQaU3-0004dC-Ru for emacs-devel@gnu.org; Sun, 29 May 2011 03:32:24 -0400 Original-Received: from mx.meyering.net ([82.230.74.64]:55191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQaU3-0004d8-M8 for emacs-devel@gnu.org; Sun, 29 May 2011 03:32:23 -0400 Original-Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id D5CEE6005B; Sun, 29 May 2011 09:32:22 +0200 (CEST) In-Reply-To: <4DE1DD2B.5020902@cs.ucla.edu> (Paul Eggert's message of "Sat, 28 May 2011 22:44:11 -0700") Original-Lines: 39 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.230.74.64 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139873 Archived-At: Paul Eggert wrote: > On 05/27/11 14:50, Jim Meyering wrote: >> export MALLOC_PERTURB_=$((RANDOM % 255 + 1)) >> export MALLOC_CHECK_=3 >> > > I tried that, on Fedora 14 x86-64, and the Emacs trunk build failed > as follows: > > Compiling language/thai-word.el > > In toplevel form: > language/thai-word.el:10738:5:Error: Memory exhausted--use C-x s > then exit and restart Emacs > make[2]: *** [language/thai-word.elc] Error 1 > make[2]: Leaving directory `/home/eggert/src/gnu/emacs/int-hash/lisp' > > As near as I can discover, Emacs was fine, but the malloc debugging > caused it to use so much more memory that Emacs ran out of memory > trying to compile thai-word.el. This is on a host with > 8 GiB of RAM. > > Perhaps there is a real Emacs bug in there somewhere, but I spent > a reasonable amount of time looking for it unsuccessfully. Same here. I even bisected back through several years of commits to find the one that *appeared* to introduce this problem: http://thread.gmane.org/gmane.emacs.devel/137942 But all that was assuming a reliable compiler. With those envvar settings, I've been bootstrapping emacs for months, but only with this kludge: make bootstrap RUN_TEMACS='MALLOC_CHECK_=0 ./temacs' Yesterday, I found that I can bootstrap with no kludge at all as long as I use the latest gcc-4.7.0. I.e., with that compiler, a plain "make bootstrap" now succeeds in spite of my aggressive envvar settings.