diff options
| author | Glenn Morris | 2014-08-03 16:34:33 -0400 |
|---|---|---|
| committer | Glenn Morris | 2014-08-03 16:34:33 -0400 |
| commit | 3cc0c06094c8731c9e15536fefd3382d8ca1eba0 (patch) | |
| tree | 3e6011e46b620c73efdccacf932bdc3565488655 | |
| parent | 308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d (diff) | |
| parent | a270fa7cf82cb23c6dcd84aab7f2c178ac0cca55 (diff) | |
| download | emacs-3cc0c06094c8731c9e15536fefd3382d8ca1eba0.tar.gz emacs-3cc0c06094c8731c9e15536fefd3382d8ca1eba0.zip | |
Merge from emacs-24; up to 2014-06-27T16:27:08Z!rgm@gnu.org
| -rw-r--r-- | lisp/calendar/todo-mode.el | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/dired.c | 7 | ||||
| -rw-r--r-- | src/xterm.c | 9 | ||||
| -rw-r--r-- | src/xterm.h | 3 |
5 files changed, 26 insertions, 6 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 6a857a10fda..ab12ebc17f0 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el | |||
| @@ -5226,7 +5226,7 @@ Overrides `diary-goto-entry'." | |||
| 5226 | 5226 | ||
| 5227 | (defun todo--user-error-if-marked-done-item () | 5227 | (defun todo--user-error-if-marked-done-item () |
| 5228 | "Signal user error on marked done items. | 5228 | "Signal user error on marked done items. |
| 5229 | Helper funtion for editing commands that only apply to (possibly | 5229 | Helper function for editing commands that apply only to (possibly |
| 5230 | marked) not done todo items." | 5230 | marked) not done todo items." |
| 5231 | (save-excursion | 5231 | (save-excursion |
| 5232 | (save-restriction | 5232 | (save-restriction |
diff --git a/src/ChangeLog b/src/ChangeLog index b0768dd5489..da3d197d6f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,16 @@ | |||
| 1 | 2014-08-03 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2014-08-03 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Fix bug with clang + directory_files_internal + GC (Bug#16986). | ||
| 4 | * dired.c (directory_files_internal): Use a volatile variable | ||
| 5 | to prevent the compiler from optimizing away all copies of a local. | ||
| 6 | I wonder how many other GC-related bugs like this lurk elsewhere? | ||
| 7 | |||
| 8 | Avoid 100% CPU utilization on ssh session exit (Bug#17691). | ||
| 9 | * xterm.h (struct x_display_info): New member 'connection'. | ||
| 10 | * xterm.c (x_term_init, x_delete_terminal): Set and use it, | ||
| 11 | so that x_delete_terminal has a file descriptor to pass to | ||
| 12 | delete_keyboard_wait_descriptor. | ||
| 13 | |||
| 3 | Don't mishandle year-9999 dates (Bug#18176). | 14 | Don't mishandle year-9999 dates (Bug#18176). |
| 4 | * editfns.c (decode_time_components): Store an invalid timespec | 15 | * editfns.c (decode_time_components): Store an invalid timespec |
| 5 | on overflow, instead of returning false, so that the caller can | 16 | on overflow, instead of returning false, so that the caller can |
diff --git a/src/dired.c b/src/dired.c index d3fe5b4943d..ba6a61a2f5b 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -150,6 +150,12 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, | |||
| 150 | Lisp_Object w32_save = Qnil; | 150 | Lisp_Object w32_save = Qnil; |
| 151 | #endif | 151 | #endif |
| 152 | 152 | ||
| 153 | /* Don't let the compiler optimize away all copies of DIRECTORY, | ||
| 154 | which would break GC; see Bug#16986. Although this is required | ||
| 155 | only in the common case where GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS, | ||
| 156 | it shouldn't break anything in the other cases. */ | ||
| 157 | Lisp_Object volatile directory_volatile = directory; | ||
| 158 | |||
| 153 | /* Because of file name handlers, these functions might call | 159 | /* Because of file name handlers, these functions might call |
| 154 | Ffuncall, and cause a GC. */ | 160 | Ffuncall, and cause a GC. */ |
| 155 | list = encoded_directory = dirfilename = Qnil; | 161 | list = encoded_directory = dirfilename = Qnil; |
| @@ -325,6 +331,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, | |||
| 325 | list = Fsort (Fnreverse (list), | 331 | list = Fsort (Fnreverse (list), |
| 326 | attrs ? Qfile_attributes_lessp : Qstring_lessp); | 332 | attrs ? Qfile_attributes_lessp : Qstring_lessp); |
| 327 | 333 | ||
| 334 | (void) directory_volatile; | ||
| 328 | RETURN_UNGCPRO (list); | 335 | RETURN_UNGCPRO (list); |
| 329 | } | 336 | } |
| 330 | 337 | ||
diff --git a/src/xterm.c b/src/xterm.c index e35d63c785f..4fa4b7ab02b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10815,6 +10815,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10815 | 10815 | ||
| 10816 | dpyinfo->name_list_element = Fcons (display_name, Qnil); | 10816 | dpyinfo->name_list_element = Fcons (display_name, Qnil); |
| 10817 | dpyinfo->display = dpy; | 10817 | dpyinfo->display = dpy; |
| 10818 | dpyinfo->connection = ConnectionNumber (dpyinfo->display); | ||
| 10818 | 10819 | ||
| 10819 | /* Set the name of the terminal. */ | 10820 | /* Set the name of the terminal. */ |
| 10820 | terminal->name = xlispstrdup (display_name); | 10821 | terminal->name = xlispstrdup (display_name); |
| @@ -11267,7 +11268,6 @@ void | |||
| 11267 | x_delete_terminal (struct terminal *terminal) | 11268 | x_delete_terminal (struct terminal *terminal) |
| 11268 | { | 11269 | { |
| 11269 | struct x_display_info *dpyinfo = terminal->display_info.x; | 11270 | struct x_display_info *dpyinfo = terminal->display_info.x; |
| 11270 | int connection = -1; | ||
| 11271 | 11271 | ||
| 11272 | /* Protect against recursive calls. delete_frame in | 11272 | /* Protect against recursive calls. delete_frame in |
| 11273 | delete_terminal calls us back when it deletes our last frame. */ | 11273 | delete_terminal calls us back when it deletes our last frame. */ |
| @@ -11286,8 +11286,6 @@ x_delete_terminal (struct terminal *terminal) | |||
| 11286 | and dpyinfo->display was set to 0 to indicate that. */ | 11286 | and dpyinfo->display was set to 0 to indicate that. */ |
| 11287 | if (dpyinfo->display) | 11287 | if (dpyinfo->display) |
| 11288 | { | 11288 | { |
| 11289 | connection = ConnectionNumber (dpyinfo->display); | ||
| 11290 | |||
| 11291 | x_destroy_all_bitmaps (dpyinfo); | 11289 | x_destroy_all_bitmaps (dpyinfo); |
| 11292 | XSetCloseDownMode (dpyinfo->display, DestroyAll); | 11290 | XSetCloseDownMode (dpyinfo->display, DestroyAll); |
| 11293 | 11291 | ||
| @@ -11329,11 +11327,12 @@ x_delete_terminal (struct terminal *terminal) | |||
| 11329 | } | 11327 | } |
| 11330 | 11328 | ||
| 11331 | /* No more input on this descriptor. */ | 11329 | /* No more input on this descriptor. */ |
| 11332 | if (connection != -1) | 11330 | if (0 <= dpyinfo->connection) |
| 11333 | delete_keyboard_wait_descriptor (connection); | 11331 | delete_keyboard_wait_descriptor (dpyinfo->connection); |
| 11334 | 11332 | ||
| 11335 | /* Mark as dead. */ | 11333 | /* Mark as dead. */ |
| 11336 | dpyinfo->display = NULL; | 11334 | dpyinfo->display = NULL; |
| 11335 | dpyinfo->connection = -1; | ||
| 11337 | x_delete_display (dpyinfo); | 11336 | x_delete_display (dpyinfo); |
| 11338 | unblock_input (); | 11337 | unblock_input (); |
| 11339 | } | 11338 | } |
diff --git a/src/xterm.h b/src/xterm.h index 3e92ebd2317..c8673123611 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -138,6 +138,9 @@ struct x_display_info | |||
| 138 | /* This says how to access this display in Xlib. */ | 138 | /* This says how to access this display in Xlib. */ |
| 139 | Display *display; | 139 | Display *display; |
| 140 | 140 | ||
| 141 | /* A connection number (file descriptor) for the display. */ | ||
| 142 | int connection; | ||
| 143 | |||
| 141 | /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). */ | 144 | /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). */ |
| 142 | Lisp_Object name_list_element; | 145 | Lisp_Object name_list_element; |
| 143 | 146 | ||