From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58158: 29.0.50; [overlay] Interval tree iteration considered harmful Date: Thu, 29 Sep 2022 13:43:05 +0300 Message-ID: <83y1u2foli.fsf@gnu.org> References: <83h70qhez0.fsf@gnu.org> <83edvuhaby.fsf@gnu.org> <831qruh67o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38403"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58158@debbugs.gnu.org, monnier@iro.umontreal.ca To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 29 12:44:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odr1a-0009rq-NH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 12:44:14 +0200 Original-Received: from localhost ([::1]:58970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odr1Z-0000yN-Op for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 06:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odr1P-0000xC-8f for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 06:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odr1O-0005co-Vu for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 06:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odr1O-0008Ml-Pg for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 06:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Sep 2022 10:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58158 X-GNU-PR-Package: emacs Original-Received: via spool by 58158-submit@debbugs.gnu.org id=B58158.166444820332081 (code B ref 58158); Thu, 29 Sep 2022 10:44:02 +0000 Original-Received: (at 58158) by debbugs.gnu.org; 29 Sep 2022 10:43:23 +0000 Original-Received: from localhost ([127.0.0.1]:36120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odr0l-0008LG-5a for submit@debbugs.gnu.org; Thu, 29 Sep 2022 06:43:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odr0g-0008Kx-H4 for 58158@debbugs.gnu.org; Thu, 29 Sep 2022 06:43:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odr0Y-0005Iz-2c; Thu, 29 Sep 2022 06:43:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=S6yQjKgE3jJhY+pWW2lJLkTPMMIqDg3MrIL8uZ/caTk=; b=hrJRjSOAlgLmR5JDircA Ct+aqdZNiY4zTlZYWb6vH0PWShW2EZmmeoam+ixk0PBySbXM/GqVn4Yax29kooOJzFKhWgpTAS6+e +L9VxRB+XnFqQGPQsr1ajq1n+HOSVtulIrl78mI+SlEsJ+tskEdDSOs+XkNgK2W4TuWqQ0NVJoiMx KvStHYfrPyvG+u7UsiLUN+EoYlrPXcjdjjIUAVpC4PupI4uYuPdLFE2HNBtN7qbQGkjvABoAfc46O 02j1rlVldXS0MBFuwkYymGhkvCBh0a9KCgrCSzEjoymlR7zYcMEtNsVbdPWpyQjvpnLvOGe/oEhDl gbaaJZEHIVnhFQ==; Original-Received: from [87.69.77.57] (port=2720 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odr0W-000805-OJ; Thu, 29 Sep 2022 06:43:09 -0400 In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Thu, 29 Sep 2022 12:05:50 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243888 Archived-At: > From: Gerd Möllmann > Cc: monnier@iro.umontreal.ca, 58158@debbugs.gnu.org > Date: Thu, 29 Sep 2022 12:05:50 +0200 > > Eli Zaretskii writes: > > > Can you propose a fix? > > Other than completely rewrite at least this part, no. > > > 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? > > I find it very hard to tell why this is done the way it is. If someone > knowing the code can think of a reason, please speak up. I may be missing something, but it looks like the sole purpose of the iter_start/iter_finish dance is to ensure only one iteration per tree is running at any given time, and that's because the iteration uses some state variable(s) of which there's only one instance per tree. Stefan, am I missing something?