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 22:00:21 +0200 Message-ID: <20060114200021.GA25438@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> <20060113224220.GA91435@flame.pc> <873bjqvhjn.fsf-monnier+emacs@gnu.org> <878xtioaww.fsf@srcf.ucam.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137270392 1349 80.91.229.2 (14 Jan 2006 20:26:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Jan 2006 20:26:32 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 14 21:26:26 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 1Exryd-0004Fm-1O for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2006 21:26:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Exs0D-0004ZB-F1 for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2006 15:27:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ExrfA-0004uW-2M for emacs-devel@gnu.org; Sat, 14 Jan 2006 15:06:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Exrf6-0004rP-9I for emacs-devel@gnu.org; Sat, 14 Jan 2006 15:06:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ExrdK-0003mp-CJ for emacs-devel@gnu.org; Sat, 14 Jan 2006 15:04:18 -0500 Original-Received: from [195.170.0.93] (helo=aiolos.otenet.gr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ExrgX-00067p-3I for emacs-devel@gnu.org; Sat, 14 Jan 2006 15:07:37 -0500 Original-Received: from flame.pc (patr530-a088.otenet.gr [212.205.215.88]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-8) with ESMTP id k0EK1wVn029633; Sat, 14 Jan 2006 22:01:58 +0200 Original-Received: by flame.pc (Postfix, from userid 1001) id B0B8111682; Sat, 14 Jan 2006 22:00:21 +0200 (EET) Original-To: Gaute B Strokkenes Content-Disposition: inline In-Reply-To: <878xtioaww.fsf@srcf.ucam.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:49098 Archived-At: On 2006-01-14 20:40, Gaute B Strokkenes wrote: > On 14 jan 2006, monnier@iro.umontreal.ca wrote: > > Hmm... so all the assertions related to the code that uses posix_memalign > > succeeded. That makes me more or more suspect it's a bug in FreeBSD's > > posix_memalign. My gut feeling is that calling `free' on a block returned > > by `posix_memalign' messes up the malloc library's invariants. > > >From the node "Aligned Memory Blocks" in the libc manual: > > With the GNU library, you can use `free' to free the blocks that > `memalign', `posix_memalign', and `valloc' return. That does not work > in BSD, however--BSD does not provide any way to free such blocks. > > If this is information is accurate wrt. FreeBSD then that is probably > your problem, yes.... That's not true. The manpage of posix_memalign() states that: # Memory that is allocated via posix_memalign() can be used as an argument # in subsequent calls to realloc(3), reallocf(3), and free(3). So if free() messes up malloc's internal data it's a bug in the posix_memalign() implementation that needs to be fixed.