Subject: bug#52446: 28.0.90; Infinite loop in add_row_entry

From: Eli Zaretskii <[email-masked]>
Date: Sun, 12 Dec 2021 09:32:40 +0200

> Resent-From: Po Lu <[email-masked]>
> Original-Sender: "Debbugs-submit" <[email-masked]>
> Resent-CC: [email-masked]
> Resent-Sender: [email-masked]
> Date: Sun, 12 Dec 2021 13:15:29 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Emacs froze while I was scrolling through a large image with `C-n'.  The
> source of the freeze was an infinite loop in this part of
> `add_row_entry':
> 
>     while (entry && !row_equal_p (entry->row, row, 1))
> --->  entry = entry->next;
> 
> The problem seems to be that `entry' points to the same address as
> `entry->next'.

Are you sure?  This more-or-less "can't happen".  How did you see that
this was the problem?