Fix bug #10164 with assertion violations in linum-mode.
authorEli Zaretskii <eliz@gnu.org>
Wed, 30 Nov 2011 12:25:09 +0000 (07:25 -0500)
committerEli Zaretskii <eliz@gnu.org>
Wed, 30 Nov 2011 12:25:09 +0000 (07:25 -0500)
 src/dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
 attributes are tested _before_ calling verify_row_hash, to protect
 against GCC re-ordering of the tests.

src/ChangeLog
src/dispnew.c

index 3b1fd5e..086d795 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
+       attributes are tested _before_ calling verify_row_hash, to protect
+       against GCC re-ordering of the tests.  (Bug#10164)
+
 2011-11-29  Jan Djärv  <jan.h.d@swipnet.se>
 
        * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
index c9e4ec5..7e591aa 100644 (file)
@@ -608,9 +608,10 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
                  row->glyphs[LAST_AREA]
                    = row->glyphs[LEFT_MARGIN_AREA] + dim.width;
                }
-             xassert (!row->enabled_p
-                      || row->mode_line_p
-                      || verify_row_hash (row));
+#if XASSERTS
+             if (row->enabled_p && !row->mode_line_p)
+               verify_row_hash (row));
+#endif
              ++row;
            }
        }