emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99937: Fix crashes in GC in "emacs -


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99937: Fix crashes in GC in "emacs -nw".
Date: Mon, 19 Apr 2010 15:12:13 +0300
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99937
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2010-04-19 15:12:13 +0300
message:
  Fix crashes in GC in "emacs -nw".
  
   xdisp.c (display_line): Don't write beyond the last glyph row in
   the desired matrix.  Fixes crashes in "emacs -nw", see
   http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00075.html
   and http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00213.html
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-04-18 21:49:33 +0000
+++ b/src/ChangeLog     2010-04-19 12:12:13 +0000
@@ -1,3 +1,11 @@
+2010-04-19  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (display_line): Don't write beyond the last glyph row in
+       the desired matrix.  Fixes a crash in "emacs -nw", see
+       http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00075.html
+       and
+       http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00213.html
+
 2010-04-18  Stefan Monnier  <address@hidden>
 
        * alloc.c (Fpurecopy): Hash-cons if requested.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-04-17 15:53:55 +0000
+++ b/src/xdisp.c       2010-04-19 12:12:13 +0000
@@ -17808,10 +17808,12 @@
   it->current_y += row->height;
   ++it->vpos;
   ++it->glyph_row;
-  /* The next row should use same value of the reversed_p flag as this
-     one.  set_iterator_to_next decides when it's a new paragraph, and
-     PRODUCE_GLYPHS recomputes the value of the flag accordingly.  */
-  it->glyph_row->reversed_p = row->reversed_p;
+  /* The next row should by default use the same value of the
+     reversed_p flag as this one.  set_iterator_to_next decides when
+     it's a new paragraph, and PRODUCE_GLYPHS recomputes the value of
+     the flag accordingly.  */
+  if (it->glyph_row < MATRIX_BOTTOM_TEXT_ROW (it->w->desired_matrix, it->w))
+    it->glyph_row->reversed_p = row->reversed_p;
   it->start = row_end;
   return row->displays_text_p;
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]