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: Emacs 22.1 reproducible crash Date: Wed, 8 Aug 2007 13:00:39 +0300 Message-ID: <20070808100039.GB1907@kobe.laptop> References: <38018.65621.qm@web88014.mail.re2.yahoo.com> <46B85FA7.4060000@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186567285 19715 80.91.229.12 (8 Aug 2007 10:01:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 10:01:25 +0000 (UTC) Cc: Gardner Bell , Jan Dj?rv , emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 08 12:01:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIiLz-0005x3-8R for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 12:01:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIiLy-000804-O5 for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 06:01:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIiLw-0007zr-EA for emacs-devel@gnu.org; Wed, 08 Aug 2007 06:01:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIiLv-0007zf-M0 for emacs-devel@gnu.org; Wed, 08 Aug 2007 06:01:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIiLv-0007zc-J0 for emacs-devel@gnu.org; Wed, 08 Aug 2007 06:01:19 -0400 Original-Received: from igloo.linux.gr ([62.1.205.36]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IIiLu-00010B-Qa for emacs-devel@gnu.org; Wed, 08 Aug 2007 06:01:19 -0400 Original-Received: from kobe.laptop (vader.bytemobile.ondsl.gr [83.235.244.135]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l78A10xG001034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 8 Aug 2007 13:01:10 +0300 Original-Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l78A0fIB002404; Wed, 8 Aug 2007 13:00:57 +0300 (EEST) (envelope-from keramida@freebsd.org) Original-Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l78A0ddl002403; Wed, 8 Aug 2007 13:00:39 +0300 (EEST) (envelope-from keramida@freebsd.org) Content-Disposition: inline In-Reply-To: X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.056, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.34, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Detected-Kernel: Linux 2.6 (newer, 1) 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:76190 Archived-At: On 2007-08-08 11:32, YAMAMOTO Mitsuharu wrote: > >>>>> On Tue, 07 Aug 2007 14:03:51 +0200, Jan Dj?rv said: > > >> Same thing, slightly different backtrace this time. I have also > >> noticed that this is triggered much easier when using the mouse to > >> open, and close files. > > > I think this might be due to the fact that Glib uses posix_memalign, > > but there is no posix_memalign in gmalloc.c. > > Then adding its implementation to gmalloc.c simply work? This may actually work well. I recall problems with glib and Emacs since we switched to FreeBSD in a system malloc() which *does* include posix_memalign(). I haven't checked but it's possible that Emacs, when linked with GTK+ links with malloc() from gmalloc.c but calls the system version of posix_memalign(). This could definitely lead to trouble similar to what we are seeing. > Index: src/gmalloc.c > =================================================================== > RCS file: /cvsroot/emacs/emacs/src/gmalloc.c,v > retrieving revision 1.25 > diff -c -p -r1.25 gmalloc.c > *** src/gmalloc.c 7 Aug 2007 08:55:43 -0000 1.25 > --- src/gmalloc.c 8 Aug 2007 02:31:42 -0000 > *************** memalign (alignment, size) > *** 1857,1862 **** > --- 1857,1891 ---- > return result; > } > > + #ifndef ENOMEM > + #define ENOMEM 12 > + #endif > + > + #ifndef EINVAL > + #define EINVAL 22 > + #endif > + > + int > + posix_memalign (memptr, alignment, size) > + __ptr_t *memptr; > + __malloc_size_t alignment; > + __malloc_size_t size; Excellent, thanks :-) I will try this with a snapshot of HEAD from CVS in a few minutes :-)