unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Burton Samograd <burton@samograd.ca>
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: Re: GSlice: failed to allocate 504 bytes
Date: Mon, 19 Nov 2012 16:03:04 -0500	[thread overview]
Message-ID: <50AA9E88.3050904@cornell.edu> (raw)
In-Reply-To: <50AA628E.3090801@cornell.edu>

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.

Ken




  reply	other threads:[~2012-11-19 21:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 16:02 GSlice: failed to allocate 504 bytes Burton Samograd
2012-11-19 16:47 ` Ken Brown
2012-11-19 21:03   ` Ken Brown [this message]
2012-11-19 21:48     ` Burton Samograd
2012-11-20  4:52     ` Stefan Monnier
2012-11-20 13:29       ` Ken Brown
2012-11-20 14:08         ` Stefan Monnier
2012-11-19 18:05 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50AA9E88.3050904@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=burton@samograd.ca \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).