]> git.eshelyaron.com Git - emacs.git/commitdiff
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 3b1fd5e6a51d8bf12e4331246520d46a3d4e40ef..086d795341cf2ba9679aa9a529f636a32495528c 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 c9e4ec5c20e36b4a4f9babd31c760397e7b37b63..7e591aa8e8fa06f5bab3026dfd0fd032b576534d 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;
            }
        }