emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99318: Fix gc bug in terminal alloca


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99318: Fix gc bug in terminal allocation.
Date: Wed, 13 Jan 2010 13:35:36 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99318
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2010-01-13 13:35:36 -0500
message:
  Fix gc bug in terminal allocation.
  
  * xterm.c (x_term_init): Avoid garbage-collecting the new terminal
  during call to vendor-specific-keysyms (Bug#5365).
modified:
  src/ChangeLog
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-01-13 04:42:45 +0000
+++ b/src/ChangeLog     2010-01-13 18:35:36 +0000
@@ -1,3 +1,8 @@
+2010-01-13  Chong Yidong  <address@hidden>
+
+       * xterm.c (x_term_init): Avoid garbage-collecting the new terminal
+       during call to vendor-specific-keysyms (Bug#5365).
+
 2010-01-13  YAMAMOTO Mitsuharu  <address@hidden>
 
        * keyboard.c (input_available_signal) [SYNC_INPUT]:

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2010-01-13 08:35:10 +0000
+++ b/src/xterm.c       2010-01-13 18:35:36 +0000
@@ -10218,13 +10218,16 @@
        if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
          {
            char *vendor = ServerVendor (dpy);
-           /* Temporarily hide the partially initialized terminal */
+           /* Temporarily hide the partially initialized terminal,
+              but make sure it doesn't get garbage collected.  */
+           int count = inhibit_garbage_collection ();
            terminal_list = terminal->next_terminal;
            UNBLOCK_INPUT;
            terminal->kboard->Vsystem_key_alist
              = call1 (Qvendor_specific_keysyms,
                       vendor ? build_string (vendor) : empty_unibyte_string);
            BLOCK_INPUT;
+           unbind_to (count, Qnil);
            terminal->next_terminal = terminal_list;
            terminal_list = terminal;
          }


reply via email to

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