This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
GSlice problem with emacs Gtk+ build
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-xfree at cygwin dot com
- Date: Mon, 07 Dec 2009 11:06:24 -0500
- Subject: GSlice problem with emacs Gtk+ build
- Reply-to: cygwin-xfree at cygwin dot com
There's been a longstanding problem with emacs if it is configured to
use Gtk+ in Cygwin. The relevant threads begin here:
http://cygwin.com/ml/cygwin/2006-07/threads.html#00823
http://cygwin.com/ml/cygwin/2007-02/threads.html#00469
http://cygwin.com/ml/cygwin/2007-02/threads.html#00503
Briefly, the problem is the following (quoted from the emacs
etc/PROBLEMS file):
"Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign
and on Cygwin, that becomes the Cygwin supplied memalign. As malloc is
not the Cygwin malloc, the Cygwin memalign always returns ENOSYS."
The symptom is that emacs crashes with an error message like the following:
***MEMORY-ERROR***: [2428]: GSlice: failed to allocate 120 bytes
(alignment: 128): Function not implemented
Fatal error (6)Aborted (core dumped)
There's a known workaround, which is to set G_SLICE=always-malloc before
starting emacs. As emacs maintainer, I've been reluctant to provide the
Gtk+ version of emacs, because I don't want to answer hundreds of emails
telling people about the workaround. I could supply a wrapper script
that sets G_SLICE, but I'm still afraid that would cause a lot of
confusion; I suspect many people are in the habit of calling
emacs-X11.exe directly. I have therefore configured the emacs-X11
package to use Xaw instead of Gtk+. But Gtk+ is really much nicer, and
I would like to be able to provide an emacs-X11 that uses it.
At the time this was first discussed, Cygwin did not have an X
maintainer. Now that we have Jon and Yaakov actively providing Cygwin/X
support, I wonder if it would be possible to revisit the issue and try
to fix the problem. For example, might it be as simple as patching the
Cygwin port of glib to achieve the same effect as setting
G_SLICE=always-malloc?
Ken
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/