GNU bug report logs -
#9990
valgrind warning in add_row_entry
Previous Next
Reported by: Dan Nicolaescu <dann <at> gnu.org>
Date: Tue, 8 Nov 2011 14:31:01 UTC
Severity: normal
Tags: moreinfo
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 9990 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 11 Nov 2011 17:30:58 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 9990 <at> debbugs.gnu.org
>
> However, I spotted something strange related to the call to
> row_equal_p, here:
>
> /* Skip over rows equal at the bottom. */
> i = last_new;
> j = last_old;
> while (i - 1 > first_new
> && j - 1 > first_old
> && MATRIX_ROW (current_matrix, i - 1)->enabled_p
> && (MATRIX_ROW (current_matrix, i - 1)->y
> == MATRIX_ROW (desired_matrix, j - 1)->y)
> && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p
> && row_equal_p (MATRIX_ROW (desired_matrix, i - 1),
> MATRIX_ROW (current_matrix, j - 1), 1))
> --i, --j;
>
> Some of these conditions use incorrect indices to access the glyph
> matrices: `i' should be used for the current matrix and `j' for the
> desired matrix. Some of these conditions use `i' and `j' correctly,
> some don't.
Below is a patch I intend to install, if no one finds any thinko in
it. Dan, can you try this and see if it resolves the valgrind
complaints (assuming you can reproduce them)?
=== modified file 'src/dispnew.c'
--- src/dispnew.c 2011-10-08 10:58:50 +0000
+++ src/dispnew.c 2011-11-11 15:53:27 +0000
@@ -4334,10 +4334,10 @@ scrolling_window (struct window *w, int
j = last_old;
while (i - 1 > first_new
&& j - 1 > first_old
- && MATRIX_ROW (current_matrix, i - 1)->enabled_p
- && (MATRIX_ROW (current_matrix, i - 1)->y
- == MATRIX_ROW (desired_matrix, j - 1)->y)
- && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p
+ && MATRIX_ROW (current_matrix, j - 1)->enabled_p
+ && (MATRIX_ROW (current_matrix, j - 1)->y
+ == MATRIX_ROW (desired_matrix, i - 1)->y)
+ && !MATRIX_ROW (desired_matrix, i - 1)->redraw_fringe_bitmaps_p
&& row_equal_p (MATRIX_ROW (desired_matrix, i - 1),
MATRIX_ROW (current_matrix, j - 1), 1))
--i, --j;
This bug report was last modified 4 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.