emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10631: closed (Infinite loop in emacs 23 on termin


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10631: closed (Infinite loop in emacs 23 on terminal (-nw option) on xgselect.c:58-59 when compiled with gtk+ or gconf support)
Date: Sat, 19 May 2012 21:58:02 +0000

Your message dated Sat, 19 May 2012 17:56:33 -0400
with message-id <address@hidden>
and subject line Re: bug#9754: Issue with Emacs 23.4
has caused the debbugs.gnu.org bug report #9754,
regarding Infinite loop in emacs 23 on terminal (-nw option) on 
xgselect.c:58-59 when compiled with gtk+ or gconf support
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9754
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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
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

Attachment: 0001-Fix-infinit-loop-when-emacs-is-compiled-with-GTK-sup.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#9754: Issue with Emacs 23.4 Date: Sat, 19 May 2012 17:56:33 -0400 User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
Version: 24.2

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

Ken





--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]