diff options
| author | Chong Yidong | 2010-01-13 13:35:36 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-01-13 13:35:36 -0500 |
| commit | 63286bb2ec6f95a7baddb1e3b336de4c473ba24f (patch) | |
| tree | 05d2126127836af24efa59697f9c7f559f2a1b87 | |
| parent | 6c49ab95d722e73eee0127691e032f3d39a76602 (diff) | |
| download | emacs-63286bb2ec6f95a7baddb1e3b336de4c473ba24f.tar.gz emacs-63286bb2ec6f95a7baddb1e3b336de4c473ba24f.zip | |
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).
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8389fdcd83f..0930d06db91 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xterm.c (x_term_init): Avoid garbage-collecting the new terminal | ||
| 4 | during call to vendor-specific-keysyms (Bug#5365). | ||
| 5 | |||
| 1 | 2010-01-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2010-01-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * keyboard.c (input_available_signal) [SYNC_INPUT]: | 8 | * keyboard.c (input_available_signal) [SYNC_INPUT]: |
diff --git a/src/xterm.c b/src/xterm.c index 22d9f67782d..72dff200d82 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10218,13 +10218,16 @@ x_term_init (display_name, xrm_option, resource_name) | |||
| 10218 | if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) | 10218 | if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) |
| 10219 | { | 10219 | { |
| 10220 | char *vendor = ServerVendor (dpy); | 10220 | char *vendor = ServerVendor (dpy); |
| 10221 | /* Temporarily hide the partially initialized terminal */ | 10221 | /* Temporarily hide the partially initialized terminal, |
| 10222 | but make sure it doesn't get garbage collected. */ | ||
| 10223 | int count = inhibit_garbage_collection (); | ||
| 10222 | terminal_list = terminal->next_terminal; | 10224 | terminal_list = terminal->next_terminal; |
| 10223 | UNBLOCK_INPUT; | 10225 | UNBLOCK_INPUT; |
| 10224 | terminal->kboard->Vsystem_key_alist | 10226 | terminal->kboard->Vsystem_key_alist |
| 10225 | = call1 (Qvendor_specific_keysyms, | 10227 | = call1 (Qvendor_specific_keysyms, |
| 10226 | vendor ? build_string (vendor) : empty_unibyte_string); | 10228 | vendor ? build_string (vendor) : empty_unibyte_string); |
| 10227 | BLOCK_INPUT; | 10229 | BLOCK_INPUT; |
| 10230 | unbind_to (count, Qnil); | ||
| 10228 | terminal->next_terminal = terminal_list; | 10231 | terminal->next_terminal = terminal_list; |
| 10229 | terminal_list = terminal; | 10232 | terminal_list = terminal; |
| 10230 | } | 10233 | } |