Subject: bug#58158: 29.0.50; [overlay] Interval tree iteration considered harmful

From: Eli Zaretskii <[email-masked]>
Date: Thu, 29 Sep 2022 12:37:15 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>,  [email-masked]
> Date: Thu, 29 Sep 2022 11:09:17 +0200
> 
> I think it simply can't be that what is basically walking a binary tree
> requires such restrictions.  And if it does because of some quirk of the
> interval tree in itree.c, something is seriously wrong with the design.
> 
> That's a bit harsh, but I mean it :-).

Fair enough.

Can you propose a fix?

I guess the begin_iteration/end_iteration dance is because the tree
could be in inconsistent state in-between?  If so, what would it take
to avoid the inconsistency?