* GSlice: failed to allocate 504 bytes
@ 2012-11-19 16:02 Burton Samograd
2012-11-19 16:47 ` Ken Brown
2012-11-19 18:05 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Burton Samograd @ 2012-11-19 16:02 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]
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
Fatal error 6: Abortedaborted (core dumped)
Here's a gdb run with a not very useful looking backtrace:
(gdb) r
Starting program: /home/burton.samograd/src/emacs-git/src/emacs
[New Thread 7216.0x500]
[New Thread 7216.0xe3c]
[New Thread 7216.0x18e0]
[New Thread 7216.0xe38]
[New Thread 7216.0x1fac]
[New Thread 7216.0x19e0]
***MEMORY-ERROR***: [7216]: GSlice: failed to allocate 504 bytes
(alignment: 512): Function not implemented
Fatal error 6: Aborted
Program received signal SIGABRT, Aborted.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x77aaf8b1 in ntdll!RtlUpdateClonedSRWLock ()
from /cygdrive/c/Windows/system32/ntdll.dll
#2 0x76f9149d in WaitForSingleObjectEx ()
from /cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3 0x000003ac in ?? ()
#4 0x00000000 in ?? ()
This is built with --with-x-toolkit=athena and attached is my
config.log.
--
Burton Samograd
[-- Attachment #2: config.log --]
[-- Type: application/octet-stream, Size: 1264 bytes --]
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by emacs config.status 24.3.50, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on CDW764-BURTONS
config.status:1824: creating Makefile
config.status:1824: creating lib/Makefile
config.status:1824: creating lib-src/Makefile
config.status:1824: creating oldXMenu/Makefile
config.status:1824: creating doc/emacs/Makefile
config.status:1824: creating doc/misc/Makefile
config.status:1824: creating doc/lispintro/Makefile
config.status:1824: creating doc/lispref/Makefile
config.status:1824: creating src/Makefile
config.status:1824: creating lwlib/Makefile
config.status:1824: creating lisp/Makefile
config.status:1824: creating leim/Makefile
config.status:1824: creating nextstep/Makefile
config.status:1824: creating test/automated/Makefile
config.status:1824: creating admin/unidata/Makefile
config.status:1824: creating src/config.h
config.status:2043: executing depfiles commands
config.status:2043: executing mkdirs commands
config.status:2043: executing epaths commands
config.status:2043: executing gdbinit commands
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GSlice: failed to allocate 504 bytes
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
2012-11-19 18:05 ` Stefan Monnier
1 sibling, 1 reply; 8+ messages in thread
From: Ken Brown @ 2012-11-19 16:47 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
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
My guess is that Cygwin doesn't support building with x-toolkit=athena
(or else you don't have the appropriate devel packages installed). The
build probably then reverted to the default gtk, but USE_GTK wasn't
defined, so the code above didn't get invoked. I'm guessing, because I
can't tell anything from the config.log fragment that you attached, and
I don't have time right now to dig into the code or to try a build with
x-toolkit=athena myself.
Ken
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GSlice: failed to allocate 504 bytes
2012-11-19 16:47 ` Ken Brown
@ 2012-11-19 21:03 ` Ken Brown
2012-11-19 21:48 ` Burton Samograd
2012-11-20 4:52 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Ken Brown @ 2012-11-19 21:03 UTC (permalink / raw)
To: Burton Samograd; +Cc: Stefan Monnier, emacs-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GSlice: failed to allocate 504 bytes
2012-11-19 21:03 ` Ken Brown
@ 2012-11-19 21:48 ` Burton Samograd
2012-11-20 4:52 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Burton Samograd @ 2012-11-19 21:48 UTC (permalink / raw)
To: emacs-devel
Ken Brown <kbrown@cornell.edu> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GSlice: failed to allocate 504 bytes
2012-11-19 21:03 ` Ken Brown
2012-11-19 21:48 ` Burton Samograd
@ 2012-11-20 4:52 ` Stefan Monnier
2012-11-20 13:29 ` Ken Brown
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2012-11-20 4:52 UTC (permalink / raw)
To: Ken Brown; +Cc: Burton Samograd, emacs-devel
> Stefan, is it OK to apply this to the emacs-24 branch?
Yes, go ahead, please install it on the emacs-24 branch rather than on
the trunk.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: GSlice: failed to allocate 504 bytes
2012-11-19 16:02 GSlice: failed to allocate 504 bytes Burton Samograd
2012-11-19 16:47 ` Ken Brown
@ 2012-11-19 18:05 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2012-11-19 18:05 UTC (permalink / raw)
To: Burton Samograd; +Cc: emacs-devel
> 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:
Could you test it with the `emacs-24' branch? That's where the
testing&bugfixing is focused right now,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-20 14:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.