From: Paul Eggert Date: Mon, 23 May 2011 00:09:23 +0000 (-0700) Subject: Merge from trunk. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~139^2~11 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=af3d522ffbf83826f80ab8f6d811e19e97c37384;p=emacs.git Merge from trunk. --- af3d522ffbf83826f80ab8f6d811e19e97c37384 diff --cc src/ChangeLog index b74d831d707,c5594b8555d..74f0bd52a5d --- a/src/ChangeLog +++ b/src/ChangeLog @@@ -1,49 -1,37 +1,79 @@@ +2011-05-22 Paul Eggert + + Rework Fformat to avoid integer overflow issues. + * editfns.c: Include unconditionally, as it's everywhere + now (part of C89). Include . + (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed. + (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns. + (Fformat): Avoid the prepass trying to compute sizes; it was only + approximate and thus did not catch overflow reliably. Instead, walk + through the format just once, formatting and computing sizes as we go, + checking for integer overflow at every step, and allocating a larger + buffer as needed. Keep track separately whether the format is + multibyte. Keep only the most-recently calculated precision, rather + than them all. Record whether each argument has been converted to + string. Use EMACS_INT, not int, for byte and char and arg counts. + Support field widths and precisions larger than INT_MAX. Avoid + sprintf's undefined behavior with conversion specifications such as %#d + and %.0c. Fix bug with strchr succeeding on '\0' when looking for + flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when + formatting out-of-range floating point numbers with int + formats. (Bug#8668) + + * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN. + - 2011-05-21 Paul Eggert - + * data.c: Avoid integer truncation in expressions involving floats. + * data.c: Include . + (arith_driver): When there's an integer overflow in an expression + involving floating point, convert the integers to floating point + so that the resulting value does not suffer from catastrophic + integer truncation. For example, on a 64-bit host (* 4 + most-negative-fixnum 0.5) should yield about -4.6e+18, not zero. + Do not rely on undefined behavior after integer overflow. + - 2011-05-20 Paul Eggert - + merge count_size_as_multibyte, parse_str_to_multibyte + * character.c, character.h (count_size_as_multibyte): + Renamed from parse_str_to_multibyte; all uses changed. + Check for integer overflow. + * insdel.c, lisp.h (count_size_as_multibyte): Remove, + since it's now a duplicate of the other. This is more of + a character than a buffer op, so better that it's in character.c. + * fns.c, print.c: Adjust to above changes. + + 2011-05-22 Paul Eggert + + * gnutls.c: Remove unused macros. + (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function): + (fn_gnutls_transport_set_push_function) [!WINDOWSNT]: + Remove macros that are defined and never used. + Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14). + + 2011-05-22 Chong Yidong + + * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS. + (Fx_get_selection_internal): Minor cleanup. + (Fx_own_selection_internal): Rename arguments for consistency with + select.el. + + 2011-05-22 Paul Eggert + + * xselect.c (QSAVE_TARGETS): New static var, to fix build failure. + + 2011-05-22 Chong Yidong + + * xselect.c (syms_of_xselect): Include character.h; use DEFSYM. + + 2011-05-21 YAMAMOTO Mitsuharu + + * dispnew.c (scrolling_window): Don't exclude the case that the + last enabled row in the desired matrix touches the bottom boundary. + + 2011-05-21 Glenn Morris + + * Makefile.in ($(etc)/DOC): Make second command line even shorter. + (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion, + and add some more files. + 2011-05-20 Eli Zaretskii * callproc.c (Fcall_process) [MSDOS]: Fix arguments to