diff options
| author | Paul Eggert | 2011-07-28 09:27:30 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-28 09:27:30 -0700 |
| commit | 70c2e72ae5368e39277de78a414c9d42292886c5 (patch) | |
| tree | dc2f35bb271058a7dc728ef970da93db9a48b2ff /src/ChangeLog | |
| parent | f13cae31f1beecc4f3fd39e4aa4bcb9fc8d9e7c1 (diff) | |
| parent | 58e9b49a90338bf979b86951b6d85e60308ecc3e (diff) | |
| download | emacs-70c2e72ae5368e39277de78a414c9d42292886c5.tar.gz emacs-70c2e72ae5368e39277de78a414c9d42292886c5.zip | |
Merge from trunk.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 233 |
1 files changed, 231 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d88ae6b16dd..d618b30ceba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,6 +1,235 @@ | |||
| 1 | 2011-07-25 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | |||
| 3 | * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169). | ||
| 4 | |||
| 5 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 6 | |||
| 7 | * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1. | ||
| 8 | In other words, assume that every image size is allowed, on non-X | ||
| 9 | hosts. This assumption is probably wrong, but it lets Emacs compile. | ||
| 10 | |||
| 11 | 2011-07-28 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | 12 | ||
| 3 | * Makefile.in (gl-stamp): move-if-change is now in build-aux (Bug#9169). | 13 | * regex.c (re_iswctype): Convert return values to boolean. |
| 14 | |||
| 15 | 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org> | ||
| 16 | |||
| 17 | * xdisp.c (compute_display_string_pos): Don't use cached display | ||
| 18 | string position if the buffer had its restriction changed. | ||
| 19 | (Bug#9184) | ||
| 20 | |||
| 21 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 22 | |||
| 23 | * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. | ||
| 24 | |||
| 25 | 2011-07-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 26 | |||
| 27 | Integer signedness and overflow and related fixes. (Bug#9079) | ||
| 28 | |||
| 29 | * bidi.c: Integer size and overflow fixes. | ||
| 30 | (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx) | ||
| 31 | (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search) | ||
| 32 | (bidi_cache_find_level_change, bidi_cache_ensure_space) | ||
| 33 | (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack) | ||
| 34 | (bidi_find_other_level_edge): | ||
| 35 | Use ptrdiff_t instead of EMACS_INT where either will do. | ||
| 36 | This works better on 32-bit hosts configured --with-wide-int. | ||
| 37 | (bidi_cache_ensure_space): Check for size-calculation overflow. | ||
| 38 | Use % rather than repeated addition, for better worst-case speed. | ||
| 39 | Don't set bidi_cache_size until after xrealloc returns, because it | ||
| 40 | might not return. | ||
| 41 | (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow. | ||
| 42 | (bidi_cache_ensure_space): Also check that the bidi cache size | ||
| 43 | does not exceed that of the largest Lisp string or buffer. See Eli | ||
| 44 | Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>. | ||
| 45 | |||
| 46 | * alloc.c (__malloc_size_t): Remove. | ||
| 47 | All uses replaced by size_t. See Andreas Schwab's note | ||
| 48 | <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>. | ||
| 49 | |||
| 50 | * image.c: Improve checking for integer overflow. | ||
| 51 | (check_image_size): Assume that f is nonnull, since | ||
| 52 | it is always nonnull in practice. This is one less thing to | ||
| 53 | worry about when checking for integer overflow later. | ||
| 54 | (x_check_image_size): New function, which checks for integer | ||
| 55 | overflow issues inside X. | ||
| 56 | (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it. | ||
| 57 | This removes the need for a memory_full check. | ||
| 58 | (xbm_image_p): Rewrite to avoid integer multiplication overflow. | ||
| 59 | (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size. | ||
| 60 | (xbm_read_bitmap_data): Change locals back to 'int', since | ||
| 61 | their values must fit in 'int'. | ||
| 62 | (xpm_load_image, png_load, tiff_load): | ||
| 63 | Invoke x_create_x_image_and_pixmap earlier, | ||
| 64 | to avoid much needless work if the image is too large. | ||
| 65 | (tiff_load): Treat overly large images as if | ||
| 66 | x_create_x_image_and_pixmap failed, not as malloc failures. | ||
| 67 | (gs_load): Use x_check_image_size. | ||
| 68 | |||
| 69 | * gtkutil.c: Omit integer casts. | ||
| 70 | (xg_get_pixbuf_from_pixmap): Remove unnecessary cast. | ||
| 71 | (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast. | ||
| 72 | |||
| 73 | * image.c (png_load): Don't assume height * row_bytes fits in 'int'. | ||
| 74 | |||
| 75 | * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug. | ||
| 76 | Without this fix, (bitmap-spec-p '(34359738368 1 "x")) | ||
| 77 | would wrongly return t on a 64-bit host. | ||
| 78 | |||
| 79 | * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros. | ||
| 80 | The plain *_OVERFLOW macros run afoul of GCC bug 49705 | ||
| 81 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705> | ||
| 82 | and therefore cause GCC to emit a bogus diagnostic in some cases. | ||
| 83 | |||
| 84 | * image.c: Integer signedness and overflow and related fixes. | ||
| 85 | This is not an exhaustive set of fixes, but it's time to | ||
| 86 | record what I've got. | ||
| 87 | (lookup_pixel_color, check_image_size): Remove redundant decls. | ||
| 88 | (check_image_size): Don't assume that arbitrary EMACS_INT values | ||
| 89 | fit in 'int', or that arbitrary 'double' values fit in 'int'. | ||
| 90 | (x_alloc_image_color, x_create_x_image_and_pixmap, png_load) | ||
| 91 | (tiff_load, imagemagick_load_image): | ||
| 92 | Check for overflow in size calculations. | ||
| 93 | (x_create_x_image_and_pixmap): Remove unnecessary test for | ||
| 94 | xmalloc returning NULL; that can't happen. | ||
| 95 | (xbm_read_bitmap_data): Don't assume sizes fit into 'int'. | ||
| 96 | (xpm_color_bucket): Use better integer hashing function. | ||
| 97 | (xpm_cache_color): Don't possibly over-allocate memory. | ||
| 98 | (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory) | ||
| 99 | (gif_memory_source): | ||
| 100 | Use ptrdiff_t, not int or size_t, to record sizes. | ||
| 101 | (png_load): Don't assume values greater than 2**31 fit in 'int'. | ||
| 102 | (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when | ||
| 103 | either works, as we prefer signed integers. | ||
| 104 | (tiff_read_from_memory, tiff_write_from_memory): | ||
| 105 | Return tsize_t, not size_t, since that's what the TIFF API wants. | ||
| 106 | (tiff_read_from_memory): Don't fail simply because the read would | ||
| 107 | go past EOF; instead, return a short read. | ||
| 108 | (tiff_load): Omit no-longer-needed casts. | ||
| 109 | (Fimagemagick_types): Don't assume size fits into 'int'. | ||
| 110 | |||
| 111 | Improve hashing quality when configured --with-wide-int. | ||
| 112 | * fns.c (hash_string): New function, taken from sxhash_string. | ||
| 113 | Do not discard information about ASCII character case; this | ||
| 114 | discarding is no longer needed. | ||
| 115 | (sxhash-string): Use it. Change sig to match it. Caller changed. | ||
| 116 | * lisp.h: Declare it. | ||
| 117 | * lread.c (hash_string): Remove, since we now use fns.c's version. | ||
| 118 | The fns.c version returns a wider integer if --with-wide-int is | ||
| 119 | specified, so this should help the quality of the hashing a bit. | ||
| 120 | |||
| 121 | * emacs.c: Integer overflow minor fix. | ||
| 122 | (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed. | ||
| 123 | Define only if GNU_LINUX. | ||
| 124 | (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX. | ||
| 125 | |||
| 126 | * dispnew.c: Integer signedness and overflow fixes. | ||
| 127 | Remove unnecessary forward decls, that were a maintenance hassle. | ||
| 128 | (history_tick): Now uprintmax_t, so it's more likely to avoid overflow. | ||
| 129 | All uses changed. | ||
| 130 | (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer) | ||
| 131 | (scrolling_window): Use ptrdiff_t, not int, for byte count. | ||
| 132 | (prepare_desired_row, line_draw_cost): | ||
| 133 | Use int, not unsigned, where either works. | ||
| 134 | (save_current_matrix, restore_current_matrix): | ||
| 135 | Use ptrdiff_t, not size_t, where either works. | ||
| 136 | (init_display): Check for overflow more accurately, and without | ||
| 137 | relying on undefined behavior. | ||
| 138 | |||
| 139 | * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide): | ||
| 140 | Remove, replacing with the new symbols in lisp.h. All uses changed. | ||
| 141 | * fileio.c (make_temp_name): | ||
| 142 | * filelock.c (lock_file_1, lock_file): | ||
| 143 | * xdisp.c (message_dolog): | ||
| 144 | Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts. | ||
| 145 | Use pMd etc. instead. | ||
| 146 | * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros, | ||
| 147 | replacing the pWIDE etc. symbols removed from editfns.c. | ||
| 148 | |||
| 149 | * keyboard.h (num_input_events): Now uintmax_t. | ||
| 150 | This is (very slightly) less likely to mess up due to wraparound. | ||
| 151 | All uses changed. | ||
| 152 | |||
| 153 | * buffer.c: Integer signedness fixes. | ||
| 154 | (alloc_buffer_text, enlarge_buffer_text): | ||
| 155 | Use ptrdiff_t rather than size_t when either will do, as we prefer | ||
| 156 | signed integers. | ||
| 157 | |||
| 158 | * alloc.c: Integer signedness and overflow fixes. | ||
| 159 | Do not impose an arbitrary 32-bit limit on malloc sizes when debugging. | ||
| 160 | (__malloc_size_t): Default to size_t, not to int. | ||
| 161 | (pure_size, pure_bytes_used_before_overflow, stack_copy_size) | ||
| 162 | (Fgarbage_collect, mark_object_loop_halt, mark_object): | ||
| 163 | Prefer ptrdiff_t to size_t when either would do, as we prefer | ||
| 164 | signed integers. | ||
| 165 | (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro. | ||
| 166 | (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer): | ||
| 167 | Now const. Initialize with values that are in range even if char | ||
| 168 | is signed. | ||
| 169 | (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ... | ||
| 170 | (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed. | ||
| 171 | These functions do the right thing with sizes > 2**32. | ||
| 172 | (check_depth): Now ptrdiff_t, not int. | ||
| 173 | (overrun_check_malloc, overrun_check_realloc, overrun_check_free): | ||
| 174 | Adjust to new way of storing sizes. Check for size overflow bugs | ||
| 175 | in rest of code. | ||
| 176 | (STRING_BYTES_MAX): Adjust to new overheads. The old code was | ||
| 177 | slightly wrong anyway, as it missed one instance of | ||
| 178 | XMALLOC_OVERRUN_CHECK_OVERHEAD. | ||
| 179 | (refill_memory_reserve): Omit needless cast to size_t. | ||
| 180 | (mark_object_loop_halt): Mark as externally visible. | ||
| 181 | |||
| 182 | * xselect.c: Integer signedness and overflow fixes. | ||
| 183 | (Fx_register_dnd_atom, x_handle_dnd_message): | ||
| 184 | Use ptrdiff_t, not size_t, since we prefer signed. | ||
| 185 | (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow. | ||
| 186 | * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for | ||
| 187 | x_dnd_atoms_size and x_dnd_atoms_length. | ||
| 188 | |||
| 189 | * doprnt.c: Prefer signed to unsigned when either works. | ||
| 190 | * eval.c (verror): | ||
| 191 | * doprnt.c (doprnt): | ||
| 192 | * lisp.h (doprnt): | ||
| 193 | * xdisp.c (vmessage): | ||
| 194 | Use ptrdiff_t, not size_t, when using or implementing doprnt, | ||
| 195 | since the sizes cannot exceed ptrdiff_t bounds anyway, and we | ||
| 196 | prefer signed arithmetic to avoid comparison confusion. | ||
| 197 | * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow, | ||
| 198 | but is a bit tricky. | ||
| 199 | |||
| 200 | Assume freestanding C89 headers, string.h, stdlib.h. | ||
| 201 | * data.c, doprnt.c, floatfns.c, print.c: | ||
| 202 | Include float.h unconditionally. | ||
| 203 | * gmalloc.c: Assume C89-at-least behavior for preprocessor, | ||
| 204 | limits.h, stddef.h, string.h. Use memset instead of 'flood'. | ||
| 205 | * regex.c: Likewise for stddef.h, string.h. | ||
| 206 | (ISASCII): Remove; can assume it returns 1 now. All uses removed. | ||
| 207 | * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef. | ||
| 208 | * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H) | ||
| 209 | (STDC_HEADERS): Remove obsolete defines. | ||
| 210 | * sysdep.c: Include limits.h unconditionally. | ||
| 211 | |||
| 212 | Assume support for memcmp, memcpy, memmove, memset. | ||
| 213 | * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset): | ||
| 214 | * regex.c (memcmp, memcpy): | ||
| 215 | Remove; we assume C89 now. | ||
| 216 | |||
| 217 | * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now. | ||
| 218 | (__malloc_safe_bcopy): Remove; no longer needed. | ||
| 219 | |||
| 220 | * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes. | ||
| 221 | Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally | ||
| 222 | well either way, and we prefer signed to unsigned. | ||
| 223 | |||
| 224 | 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 225 | |||
| 226 | * gnutls.c (emacs_gnutls_read): Don't message anything if the peer | ||
| 227 | closes the connection while we're reading (bug#9182). | ||
| 228 | |||
| 229 | 2011-07-25 Jan Djärv <jan.h.d@swipnet.se> | ||
| 230 | |||
| 231 | * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons | ||
| 232 | are specified (Bug#9168). | ||
| 4 | 233 | ||
| 5 | 2011-07-25 Paul Eggert <eggert@cs.ucla.edu> | 234 | 2011-07-25 Paul Eggert <eggert@cs.ucla.edu> |
| 6 | 235 | ||