From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Burton Samograd Newsgroups: gmane.emacs.devel Subject: Re: GSlice: failed to allocate 504 bytes Date: Mon, 19 Nov 2012 14:48:23 -0700 Message-ID: References: <50AA628E.3090801@cornell.edu> <50AA9E88.3050904@cornell.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353362479 27938 80.91.229.3 (19 Nov 2012 22:01:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 22:01:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 19 23:01:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TaZPG-0007AM-Es for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2012 23:01:30 +0100 Original-Received: from localhost ([::1]:48658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaZP6-0006nZ-6O for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2012 17:01:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaZP3-0006nJ-87 for emacs-devel@gnu.org; Mon, 19 Nov 2012 17:01:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaZP2-0003v7-35 for emacs-devel@gnu.org; Mon, 19 Nov 2012 17:01:17 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaZP1-0003v2-Su for emacs-devel@gnu.org; Mon, 19 Nov 2012 17:01:16 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TaZPA-00075k-Dl for emacs-devel@gnu.org; Mon, 19 Nov 2012 23:01:24 +0100 Original-Received: from samograd.ca ([69.90.114.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Nov 2012 23:01:24 +0100 Original-Received: from burton by samograd.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Nov 2012 23:01:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 56 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: samograd.ca User-Agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.2.50 (cygwin) Cancel-Lock: sha1:LW16KV3s8NHdQC3nl19k7BuKMb8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154971 Archived-At: Ken Brown writes: > On 11/19/2012 11:47 AM, Ken Brown wrote: >> On 11/19/2012 11:02 AM, Burton Samograd wrote: >>> Hello, >>> >>> I've built emacs from git sources on a recent cygwin this morning and >>> when I try and run it, I get the following error on startup before it >>> crashes: >>> >>> ***MEMORY-ERROR***: [7588]: GSlice: failed to allocate 504 bytes >>> (alignment: 512): Function not implemented >> >> This used to be a problem with the gtk build, for which the following >> workaround was put into emacs.c long ago: >> >> #if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC) >> /* This is used by the Cygwin build. */ >> setenv ("G_SLICE", "always-malloc", 1); >> #endif >> >>> This is built with --with-x-toolkit=athena > > I see the problem. (And the guess in my previous email was wrong.) > > The workaround above was intended to solve a problem on Cygwin whenever > the emacs build depended on Glib. When I provided that workaround, I > thought this only happened in a GTK build. But I see now that there are > other things that can cause emacs to depend on Glib, even in a Lucid > build. This happens in both the trunk and the emacs-24 branch. > > The following patch fixes it: > > === modified file 'src/emacs.c' > --- src/emacs.c 2012-10-31 17:27:29 +0000 > +++ src/emacs.c 2012-11-19 20:50:37 +0000 > @@ -702,7 +702,7 @@ > stack_base = &dummy; > #endif > > -#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC) > +#ifdef G_SLICE_ALWAYS_MALLOC > /* This is used by the Cygwin build. */ > setenv ("G_SLICE", "always-malloc", 1); > #endif > > > Stefan, is it OK to apply this to the emacs-24 branch? The bug is not a > regression, but I think the patch is clearly safe. And it affects only > the Cygwin build. That patch worked for me, and the build no-longer crashes on startup. Thanks. -- Burton Samograd