aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorEli Zaretskii2014-12-10 19:39:37 +0200
committerEli Zaretskii2014-12-10 19:42:12 +0200
commitf3e16cbb5258fcbe2969eb48b332b2c629cfb2a6 (patch)
treeb92dd39f0b8a18caa28da17b09ec62740d2dca1f /src/ChangeLog
parent8bc7ac5c25f42b745cc90131a9a456f763582dbf (diff)
downloademacs-f3e16cbb5258fcbe2969eb48b332b2c629cfb2a6.tar.gz
emacs-f3e16cbb5258fcbe2969eb48b332b2c629cfb2a6.zip
Fix out-of-memory condition in display of long bracketed lines (bug#19322)
src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro. (bidi_cache_max_elts): New global variable. (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts. (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to its initial value. (bidi_cache_search): Handle overflown cache. Improve commentary. (bidi_cache_ensure_space): Limit allocations to the current value of bidi_cache_max_elts. Force xpalloc not to over-allocate. If less than a full BIDI_CACHE_CHUNK is left to the limit, decrease the increment to not exceed the limit. (bidi_cache_iterator_state): Now returns non-zero if succeeded to cache, zero otherwise (meaning the cache overflowed). In the latter case, set bidi_cache_last_idx to -1. (bidi_peek_at_next_level): Handle overflown cache. (bidi_push_it): Increase the cache limit for iterating the new object. (bidi_pop_it): Decrease the cache limit back to previous value. (bidi_shelve_cache): Shelve the current value of the cache limit. (bidi_unshelve_cache): Restore the value of cache limit. (bidi_find_bracket_pairs): If the cache overflows while looking for the paired bracket, give up and let bidi_resolve_neutrals process the bracket as a simple neutral. (bidi_find_other_level_edge): If the cache overflows, fall back on Plan B, which effectively stops the reordering and restarts it on the next character (after resetting the cache). (bidi_move_to_visually_next): When the cache overflows, reset it after processing the last cached character.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 09268d1b6cd..2a6e2373fcd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,33 @@
12014-12-10 Eli Zaretskii <eliz@gnu.org>
2
3 * bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
4 (bidi_cache_max_elts): New global variable.
5 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
6 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
7 its initial value.
8 (bidi_cache_search): Handle overflown cache. Improve commentary.
9 (bidi_cache_ensure_space): Limit allocations to the current value
10 of bidi_cache_max_elts. Force xpalloc not to over-allocate. If
11 less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
12 the increment to not exceed the limit.
13 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
14 cache, zero otherwise (meaning the cache overflowed). In the
15 latter case, set bidi_cache_last_idx to -1.
16 (bidi_peek_at_next_level): Handle overflown cache.
17 (bidi_push_it): Increase the cache limit for iterating the new
18 object.
19 (bidi_pop_it): Decrease the cache limit back to previous value.
20 (bidi_shelve_cache): Shelve the current value of the cache limit.
21 (bidi_unshelve_cache): Restore the value of cache limit.
22 (bidi_find_bracket_pairs): If the cache overflows while looking
23 for the paired bracket, give up and let bidi_resolve_neutrals
24 process the bracket as a simple neutral. (Bug#19322)
25 (bidi_find_other_level_edge): If the cache overflows, fall back on
26 Plan B, which effectively stops the reordering and restarts it on
27 the next character (after resetting the cache).
28 (bidi_move_to_visually_next): When the cache overflows, reset it
29 after processing the last cached character.
30
12014-12-10 Paul Eggert <eggert@cs.ucla.edu> 312014-12-10 Paul Eggert <eggert@cs.ucla.edu>
2 32
3 Fix glitches in gnutls.c, mostly memory-related 33 Fix glitches in gnutls.c, mostly memory-related