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: [mituharu@math.s.chiba-u.ac.jp: Re: emacs-22.1 with GTK dumps core when Gnome wigets clicked] Date: Thu, 21 Jun 2007 20:36:55 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <467A4F49.9040906@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 1182425833 27202 80.91.229.12 (21 Jun 2007 11:37:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2007 11:37:13 +0000 (UTC) Cc: rms@gnu.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 Thu Jun 21 13:37:09 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 1I1KyH-0005vO-1w for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2007 13:37:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1KyG-00053m-Dm for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2007 07:37:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1KyD-00052B-U4 for emacs-devel@gnu.org; Thu, 21 Jun 2007 07:37:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1KyB-00050s-6y for emacs-devel@gnu.org; Thu, 21 Jun 2007 07:37:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1KyB-00050p-3S for emacs-devel@gnu.org; Thu, 21 Jun 2007 07:36:59 -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 1I1Ky9-0004Hc-Eo; Thu, 21 Jun 2007 07:36:57 -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 E7E6C2C43; Thu, 21 Jun 2007 20:36:55 +0900 (JST) In-Reply-To: <467A4F49.9040906@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:73521 Archived-At: >>>>> On Thu, 21 Jun 2007 12:13:29 +0200, Jan Dj=E4rv = said: > The patch was corrupted by some mailer so I could not apply it, but: > ! /* Copy the value of __malloc_hook to an automatic variable in case > ! __malloc_hook is modified in another thread between its > ! NULL-check and the use. */ > ! hook =3D __malloc_hook; > ! return (hook !=3D NULL ? *hook : _malloc_internal) (size); > } > Assignment is not guaranteed to be atomic. It probably is on 32-bit syst= ems,=20 > but you should not assume it. Maybe. But malloc in glibc 2.5 also does the same thing and I suspect that we cannot do better as long as we try to keep the same interface with respect to __malloc_hook etc. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp