]> code.delx.au - gnu-emacs/blobdiff - src/ChangeLog
Fix the MS-Windows build broken by SAFE_ALLOCA changes.
[gnu-emacs] / src / ChangeLog
index 0a0b0934968efb283733e2a84d6fafd629dea003..acb8eed47227849f6a124b0de2b5232385782ac1 100644 (file)
@@ -1,3 +1,172 @@
+2014-09-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
+       'alloca' gets passed arguments larger than MAX_ALLOCA.
+
+       * font.c (MAX): Define if not defined elsewhere.
+
+2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
+       here for destination buffer, to work around what appears to be a
+       bug in decode_coding_c_string when the source and destination are
+       both C strings.
+
+       Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
+       This follows up on the recent thread in emacs-devel on alloca; see:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
+       This patch also cleans up alloca-related glitches noted while
+       examining the code looking for unbounded alloca.
+       * alloc.c (listn):
+       * callproc.c (init_callproc):
+       Rewrite to avoid need for alloca.
+       * buffer.c (mouse_face_overlay_overlaps)
+       (report_overlay_modification):
+       * buffer.h (GET_OVERLAYS_AT):
+       * coding.c (make_subsidiaries):
+       * doc.c (Fsnarf_documentation):
+       * editfns.c (Fuser_full_name):
+       * fileio.c (Ffile_name_directory, Fexpand_file_name)
+       (search_embedded_absfilename, Fsubstitute_in_file_name):
+       * fns.c (Fmake_hash_table):
+       * font.c (font_vconcat_entity_vectors, font_update_drivers):
+       * fontset.c (fontset_pattern_regexp, Ffontset_info):
+       * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
+       (xrdb_get_resource, x_get_resource_string):
+       * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
+       * ftxfont.c (ftxfont_draw):
+       * image.c (xbm_load, xpm_load, jpeg_load_body):
+       * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
+
+       * keymap.c (Fdescribe_buffer_bindings, describe_map):
+       * lread.c (openp):
+       * menu.c (digest_single_submenu, find_and_call_menu_selection)
+       (find_and_return_menu_selection):
+       * print.c (PRINTFINISH):
+       * process.c (Fformat_network_address):
+       * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
+       * search.c (search_buffer, Fmatch_data, Fregexp_quote):
+       * sound.c (wav_play, au_play):
+       * syntax.c (skip_chars):
+       * term.c (tty_menu_activate, tty_menu_show):
+       * textprop.c (get_char_property_and_overlay):
+       * window.c (Fset_window_configuration):
+       * xdisp.c (safe__call, next_overlay_change, vmessage)
+       (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
+       * xfaces.c (face_at_buffer_position):
+       * xmenu.c (x_menu_show):
+       Use SAFE_ALLOCA etc. instead of plain alloca, since the
+       allocation size isn't bounded.
+       * callint.c (Fcall_interactively): Redo memory_full check
+       so that it can be done at compile-time on some platforms.
+       * coding.c (MAX_LOOKUP_MAX): New constant.
+       (get_translation_table): Use it.
+       * callproc.c (call_process): Use SAFE_NALLOCA instead of
+       SAFE_ALLOCA, to catch integer overflows on size calculation.
+       (exec_failed) [!DOS_NT]: New function.
+       (child_setup) [!DOS_NT]: Use it.
+       * editfns.c (Ftranspose_regions):
+       Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
+       * editfns.c (check_translation):
+       Allocate larger buffers on the heap.
+       * eval.c (internal_lisp_condition_case):
+       Check for MAX_ALLOCA overflow.
+       * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
+       (Fbase64_encode_region, Fbase64_decode_region):
+       Avoid unnecessary calls to SAFE_FREE before 'error'.
+       * buffer.c (mouse_face_overlay_overlaps):
+       * editfns.c (Fget_pos_property, check_translation):
+       * eval.c (Ffuncall):
+       * font.c (font_unparse_xlfd, font_find_for_lface):
+       * ftfont.c (ftfont_drive_otf):
+       * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
+       (menu_bar_items, tool_bar_items):
+       * sound.c (Fplay_sound_internal):
+       * xdisp.c (load_overlay_strings, dump_glyph_row):
+       Use an ordinary auto buffer rather than alloca, since the
+       allocation size is fixed and small.
+       * ftfont.c: Include <c-strcase.h>.
+       (matching_prefix): New function.
+       (get_adstyle_property): Use it, to avoid need for alloca.
+       * keyboard.c (echo_add_key):
+       * keymap.c (describe_map): Use ptrdiff_t, not int.
+       * keyboard.c (echo_add_key): Prefer sizeof to strlen.
+       * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
+       when counting bytes.
+       * lisp.h (xlispstrdupa): Remove, replacing with ...
+       (SAFE_ALLOCA_STRING): ... new macro with different API.
+       This fixes a portability problem, namely, alloca result
+       passed to another function.  All uses changed.
+       (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
+       not MAX_ALLOCA - 1.
+       * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
+       (REGEX_ALLOCATE): New macros.
+       (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
+       (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
+       Use them.
+       * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
+       by hand.
+       (decode_mode_spec_coding): Store directly into buf rather than
+       into an alloca temporary and copying the temporary to the buf.
+
+2014-09-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used.  (Bug#18416)
+
+2014-09-04  Jan D  <jhd@f20.localdomain>
+
+       * xterm.c (x_term_init): Don't call x_session_initialize if running
+       as a daemon (Bug#18375).
+
+       * xsmfns.c: Initialize ice_fd.
+
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Less chatter in 'make' output.
+       * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
+       (am__v_at_, am__v_at_0, am__v_at_1):  New macros, taken from Automake.
+       ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
+
+2014-09-03  Martin Rudalics  <rudalics@gmx.at>
+
+       * buffer.c (scroll-bar-height): Fix typo in doc-string.
+       * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove
+       variable.
+       * nsfns.m (Fx_create_frame):
+       * w32fns.c (Fx_create_frame):
+       * xfns.c (Fx_create_frame): Default horizontal scroll bars to
+       nil.
+
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
+       the reported row in the case of a window with a header line, by
+       improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
+       eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.  (Bug#18384)
+
+2014-09-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * eval.c (internal_lisp_condition_case): Don't overrun the stack
+       when configured --with-wide-int on typical 32-bit platforms.
+
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
+       when HPOS is negative, for the benefit of R2L glyph rows whose
+       newline overflows into the fringe.
+
+2014-09-03  Ken Brown  <kbrown@cornell.edu>
+
+       * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.  (Bug#18366)
+
+2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor cleanup of recent strlen-avoiding patch.
+       * fileio.c (CHECK_LENGTH): Remove.
+       Rewrite callers so that they don't need it.
+       (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
+       variable wasn't set.
+
 2014-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * fileio.c (CHECK_LENGTH): New macro.
 
        Use mmap(2) emulation for allocating buffer text on MS-Windows.
        * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
-       configure.
+       configure, not from HEAPSIZE.
        (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
 
        * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero