GNU bug report logs - #9754
emacs -nv fails on glib 2.31

Previous Next

Package: emacs;

Reported by: Ryan Lortie <desrt <at> desrt.ca>

Date: Fri, 14 Oct 2011 17:43:01 UTC

Severity: normal

Tags: moreinfo

Merged with 6975, 10631

Fixed in version 24.2

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maciej Marcin Piechotka <uzytkownik2 <at> gmail.com>
Subject: bug#10631: closed (Re: bug#9754: Issue with Emacs 23.4)
Date: Sat, 19 May 2012 21:58:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#9754: Infinite loop in emacs 23 on terminal (-nw option) on xgselect.c:58-59 when compiled with gtk+ or gconf support

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 10631 <at> debbugs.gnu.org.

-- 
9754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9754
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ken Brown <kbrown <at> cornell.edu>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Achim Gratz <Stromeko <at> nexgo.de>, 9754-done <at> debbugs.gnu.org
Subject: Re: bug#9754: Issue with Emacs 23.4
Date: Sat, 19 May 2012 17:56:33 -0400
Version: 24.2

I've committed the change as bzr revision 108316, and I'm closing the bug.

Ken




[Message part 3 (message/rfc822, inline)]
From: Maciej Marcin Piechotka <uzytkownik2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Infinite loop in emacs 23 on terminal (-nw option) on
	xgselect.c:58-59 when compiled with gtk+ or gconf support
Date: Sat, 28 Jan 2012 16:24:48 +0000
[Message part 4 (text/plain, inline)]
I hit an infinite loop on gselect.c:58-59. After quick debugging I found
that the problem is in loop xgselect.c:58-59:

while(n_gfds > gfds_size)
  gfds_size *= 2;

Problem is that:

(gdb) p n_gfds
$3 = 1
(gdb) p gfds_size
$4 = 0

1. It seems that xgselect_initialize was not called as X system is
initialized.

2. Is there a reason why the code is not using (much more efficient but
equivalent) such code in the first place:

if (ngfds > gfds_size)
  {
    gfds_size = 1 << g_bit_storage (ngfds);
    xfree (gfds);
    gfds = xmalloc (sizeof (*gfds) * gfds_size);
  }

3. The attached file get rids of initialization at all initializing at
the cost of conditional freeing of gfds (and starting mallocing from 1
instead of 128).

Best regards

[0001-Fix-infinit-loop-when-emacs-is-compiled-with-GTK-sup.patch (text/x-patch, attachment)]

This bug report was last modified 12 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.