From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs 22.1 reproducible crash Date: Wed, 08 Aug 2007 11:32:42 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <38018.65621.qm@web88014.mail.re2.yahoo.com> <46B85FA7.4060000@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1186540378 17691 80.91.229.12 (8 Aug 2007 02:32:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 02:32:58 +0000 (UTC) Cc: Gardner Bell , keramida@freebsd.org, emacs-devel@gnu.org To: Jan =?ISO-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 08 04:32:56 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 1IIbLx-00025q-EP for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 04:32:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIbLw-000201-Ix for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2007 22:32:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIbLt-0001zm-Lb for emacs-devel@gnu.org; Tue, 07 Aug 2007 22:32:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIbLp-0001za-Ms for emacs-devel@gnu.org; Tue, 07 Aug 2007 22:32:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIbLp-0001zX-JV for emacs-devel@gnu.org; Tue, 07 Aug 2007 22:32:45 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IIbLo-0007yV-Vc for emacs-devel@gnu.org; Tue, 07 Aug 2007 22:32:45 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D907F2C40; Wed, 8 Aug 2007 11:32:42 +0900 (JST) In-Reply-To: <46B85FA7.4060000@swipnet.se> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.1.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-Detected-Kernel: NetBSD 3.0 (DF) 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:76173 Archived-At: >>>>> On Tue, 07 Aug 2007 14:03:51 +0200, Jan Dj=E4rv = 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? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp Index: src/gmalloc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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; } =20 + #ifndef ENOMEM + #define ENOMEM 12 + #endif +=20 + #ifndef EINVAL + #define EINVAL 22 + #endif +=20 + int + posix_memalign (memptr, alignment, size) + __ptr_t *memptr; + __malloc_size_t alignment; + __malloc_size_t size; + { + __ptr_t mem; +=20 + if (alignment % sizeof (__ptr_t) !=3D 0 + || (alignment & (alignment - 1)) !=3D 0) + return EINVAL; +=20 + mem =3D memalign (alignment, size); + if (mem =3D=3D NULL) + return ENOMEM; +=20 + *memptr =3D mem; +=20 + return 0; + } +=20 #endif /* Not DJGPP v1 */ /* Allocate memory on a page boundary. Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.