From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: bootstrap & memory allocation troubles Date: Sat, 14 Jan 2006 00:42:20 +0200 Message-ID: <20060113224220.GA91435@flame.pc> References: <20060113155227.GA8439@flame.pc> <87mzhzg75p.fsf-monnier+emacs@gnu.org> <20060113212440.GA77427@flame.pc> <20060113213818.GA18365@flame.pc> <87wth3eqn8.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137193143 6436 80.91.229.2 (13 Jan 2006 22:59:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2006 22:59:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 13 23:58:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ExXsg-0002Pj-V2 for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 23:58:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExXup-0007NW-Uw for ged-emacs-devel@m.gmane.org; Fri, 13 Jan 2006 18:01:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ExXgU-0007OH-1t for emacs-devel@gnu.org; Fri, 13 Jan 2006 17:46:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ExXgS-0007ME-EH for emacs-devel@gnu.org; Fri, 13 Jan 2006 17:46:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExXgS-0007M0-5C for emacs-devel@gnu.org; Fri, 13 Jan 2006 17:46:12 -0500 Original-Received: from [195.170.0.94] (helo=rosebud.otenet.gr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ExXjV-0002gS-3v for emacs-devel@gnu.org; Fri, 13 Jan 2006 17:49:21 -0500 Original-Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-8) with SMTP id k0DMhtJu022445; Sat, 14 Jan 2006 00:43:56 +0200 Original-Received: by flame.pc (Postfix, from userid 1001) id C9B0611781; Sat, 14 Jan 2006 00:42:20 +0200 (EET) Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: <87wth3eqn8.fsf-monnier+emacs@gnu.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:49039 Archived-At: On 2006-01-13 17:13, Stefan Monnier wrote: >> Can you try and undefine HAVE_POSIX_MEMALIGN so as to tell Emacs not >> to use it, so we can see if it's related or if it's a completely >> different problem (maybe a problem with unexec)? > >> Hmmm. Comment it out HAVE_POSIX_MEMALIGN in src/config.h allows Emacs >> to bootstrap quite fine with the new malloc() implementation too. Very >> nice. At least, we know how to repeat and work around the bug now :) > > So the problem is either in the implementation of posix_memalign, or > in my use of it in src/alloc.c. > > Can you try and rebuilt with -DENABLE_CHECKING so as to activate the > `eassert' I have sprinkled in the src/alloc.c code? > > Just to be sure, try with -DENABLE_CHECKING for both cases (with and > without HAVE_POSIX_MEMALIGN). > > Since Emacs's posix_memalign code has already been used for more than > a year under GNU/Linux and probably more platforms, I'm tempted to say > the bug is in FreeBSD's new implementation. But you never know. I configured Emacs with: env CC='cc' CPPFLAGS='-DENABLE_CHECKING' MAKE='gmake' \ ./configure --prefix="$HOME/opt" --without-x On FreeBSD 7.0-CURRENT (amd64) with -DENABLE_CHECKING and the current posix_memalign(), the build crashes repeatably with: 2006-01-14 00:21:00.000000 - Generating autoloads for calendar/parse-time.el... 2006-01-14 00:21:00.000000 - Generating autoloads for calendar/parse-time.el...done 2006-01-14 00:21:00.000000 - Generating autoloads for progmodes/pascal.el... 2006-01-14 00:21:00.000000 - Generating autoloads for progmodes/pascal.el...done 2006-01-14 00:21:01.000000 - 2006-01-14 00:21:01.000000 - Emacs fatal error: alloc.c:2678: assertion failed: XTYPE (cons_free_list) == 0 2006-01-14 00:21:03.000000 - Fatal error (6)Abort trap (core dumped) 2006-01-14 00:21:03.000000 - gmake[2]: *** [autoloads] Error 134 2006-01-14 00:21:03.000000 - gmake[2]: Leaving directory `/home/keramida/ws/cvs-emacs/emacs/lisp' 2006-01-14 00:21:03.000000 - gmake[1]: *** [bootstrap-build] Error 2 2006-01-14 00:21:03.000000 - gmake[1]: Leaving directory `/home/keramida/ws/cvs-emacs/emacs' 2006-01-14 00:21:03.000000 - gmake: *** [bootstrap] Error 2 When I disable posix_memalign(), no assertion is triggered, even with -DENABLE_CHECKING.