[ANNOUNCEMENT] Uploads for 12 August

Ken Brown kbrown@cornell.edu
Tue Aug 13 14:13:00 GMT 2013

On 8/13/2013 8:08 AM, Angelo Graziosi wrote:
> Il 13/08/2013 11.52, Angelo Graziosi ha scritto:
>> Yaakov wrote:
>>> The following packages (and their subpackages) have been updated for
>>> both arches:
>> After this update my GTK builds of Emacs trunk do not work any more. For
>> example, the bootstrap of rev. 113816 I did yesterday and that worked
>> fine up to before this update, now fails so:
>> $ emacs -Q &
>> [1] 3044
>> ***MEMORY-ERROR***: [3044]: GSlice: failed to allocate 504 bytes
>> (alignment: 512): Function not implemented
>> [1]+  Aborted                 (core dumped) emacs -Q
>> So, after this update, I tried a new bootstrap (rev.113838) but id fails
>> in the same manner:
>> if test "no" = "yes"; then \
>>    rm -f bootstrap-emacs.exe; \
>>    ln temacs.exe bootstrap-emacs.exe; \
>> else \
>>    `/bin/pwd`/temacs --batch --load loadup bootstrap || exit 1; \
>>    test "X" = X ||  -zex emacs.exe; \
>>    mv -f emacs.exe bootstrap-emacs.exe; \
>> fi
>> ***MEMORY-ERROR***: [896]: GSlice: failed to allocate 504 bytes
>> (alignment: 512): Function not implemented
>> /bin/sh: line 7:   896 Aborted                 (core dumped)
>> `/bin/pwd`/temacs --batch --load loadup bootstrap
>> Makefile:835: recipe for target `bootstrap-emacs.exe' failed
>> make[2]: *** [bootstrap-emacs.exe] Error 1
>> make[2]: uscita dalla directory "/work/emacs/Work/src"
>> Makefile:379: recipe for target `src' failed
>> make[1]: *** [src] Error 2
>> make[1]: uscita dalla directory "/work/emacs/Work"
>> Makefile:1040: recipe for target `bootstrap' failed
>> make: *** [bootstrap] Error 2
>> build-emacs.sh: Bootstrap failure...
>> Probably this issue affects also the Cygwin (GTK) package of Emacs..
>> It seems that the workaround is to start Emacs with
>> G_SLICE=always-malloc,
>> $ G_SLICE=always-malloc emacs -Q &
>> Ken, wasn't this issue fixed upstream some time ago?

Yes.  The fix was to add the following for the Cygwin build, very early 
in main():

   setenv ("G_SLICE", "always-malloc", 1);

I don't know why this no longer works.  Maybe Glib now does its memory 
management initialization before emacs's main() is entered.

Yaakov, is there any chance that you could patch Glib to do the 
equivalent of G_SLICE=always-malloc on Cygwin?  This isn't really an 
emacs issue.  It would affect any GTK application that provides its own 
malloc rather than using Cygwin's malloc.  (But emacs is probably the 
only such application in the distro.)

An alternative to patching Glib would be to fix the problem directly in 
Cygwin, but I don't know how hard that is and whether Corinna and cgf 
are interested.  The issue, as I understand it, is this: Cygwin allows 
programs to supply their own malloc but not their own memalign.  Glib 
calls memalign, which becomes Cygwin's memalign, which returns ENOSYS 
when Cygwin's malloc is not being used.

There was a long discussion about this on the Cygwin mailing list in 
2007.  The thread starts at


and continues at


and did not resolve the issue.


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/

More information about the Cygwin-xfree mailing list