aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 351e46259f1..72bdb87fc70 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,101 @@
12014-09-07 Paul Eggert <eggert@cs.ucla.edu>
2
3 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
4 This follows up on the recent thread in emacs-devel on alloca; see:
5 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
6 This patch also cleans up alloca-related glitches noted while
7 examining the code looking for unbounded alloca.
8 * alloc.c (listn):
9 * callproc.c (init_callproc):
10 Rewrite to avoid need for alloca.
11 * buffer.c (mouse_face_overlay_overlaps)
12 (report_overlay_modification):
13 * buffer.h (GET_OVERLAYS_AT):
14 * coding.c (make_subsidiaries):
15 * doc.c (Fsnarf_documentation):
16 * editfns.c (Fuser_full_name):
17 * fileio.c (Ffile_name_directory, Fexpand_file_name)
18 (search_embedded_absfilename, Fsubstitute_in_file_name):
19 * fns.c (Fmake_hash_table):
20 * font.c (font_vconcat_entity_vectors, font_update_drivers):
21 * fontset.c (fontset_pattern_regexp, Ffontset_info):
22 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
23 (xrdb_get_resource, x_get_resource_string):
24 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
25 * ftxfont.c (ftxfont_draw):
26 * image.c (xbm_load, xpm_load, jpeg_load_body):
27 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items):
28 * keymap.c (Fdescribe_buffer_bindings, describe_map):
29 * lread.c (openp):
30 * menu.c (digest_single_submenu, find_and_call_menu_selection)
31 (find_and_return_menu_selection):
32 * print.c (PRINTFINISH):
33 * process.c (Fformat_network_address):
34 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
35 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
36 * sound.c (wav_play, au_play):
37 * syntax.c (skip_chars):
38 * term.c (tty_menu_activate, tty_menu_show):
39 * textprop.c (get_char_property_and_overlay):
40 * window.c (Fset_window_configuration):
41 * xdisp.c (safe__call, next_overlay_change, vmessage)
42 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
43 * xfaces.c (face_at_buffer_position):
44 * xmenu.c (x_menu_show):
45 Use SAFE_ALLOCA etc. instead of plain alloca, since the
46 allocation size isn't bounded.
47 * callint.c (Fcall_interactively): Redo memory_full check
48 so that it can be done at compile-time on some platforms.
49 * coding.c (MAX_LOOKUP_MAX): New constant.
50 (get_translation_table): Use it.
51 * callproc.c (call_process): Use SAFE_NALLOCA instead of
52 SAFE_ALLOCA, to catch integer overflows on size calculation.
53 (exec_failed) [!DOS_NT]: New function.
54 (child_setup) [!DOS_NT]: Use it.
55 * editfns.c (Ftranspose_regions):
56 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
57 * editfns.c (check_translation):
58 Allocate larger buffers on the heap.
59 * eval.c (internal_lisp_condition_case):
60 Check for MAX_ALLOCA overflow.
61 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
62 (Fbase64_encode_region, Fbase64_decode_region):
63 Avoid unnecessary calls to SAFE_FREE before 'error'.
64 * buffer.c (mouse_face_overlay_overlaps):
65 * editfns.c (Fget_pos_property, check_translation):
66 * eval.c (Ffuncall):
67 * font.c (font_unparse_xlfd, font_find_for_lface):
68 * ftfont.c (ftfont_drive_otf):
69 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
70 (menu_bar_items, tool_bar_items):
71 * sound.c (Fplay_sound_internal):
72 * xdisp.c (load_overlay_strings, dump_glyph_row):
73 Use an ordinary auto buffer rather than alloca, since the
74 allocation size is fixed and small.
75 * ftfont.c: Include <c-strcase.h>.
76 (matching_prefix): New function.
77 (get_adstyle_property): Use it, to avoid need for alloca.
78 * keyboard.c (echo_add_key):
79 * keymap.c (describe_map): Use ptrdiff_t, not int.
80 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
81 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
82 when counting bytes.
83 * lisp.h (xlispstrdupa): Remove, replacing with ...
84 (SAFE_ALLOCA_STRING): ... new macro with different API.
85 This fixes a portability problem, namely, alloca result
86 passed to another function. All uses changed.
87 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
88 not MAX_ALLOCA - 1.
89 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
90 (REGEX_ALLOCATE): New macros.
91 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
92 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
93 Use them.
94 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
95 by hand.
96 (decode_mode_spec_coding): Store directly into buf rather than
97 into an alloca temporary and copying the temporary to the buf.
98
12014-09-06 Eli Zaretskii <eliz@gnu.org> 992014-09-06 Eli Zaretskii <eliz@gnu.org>
2 100
3 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416) 101 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)