From unknown Wed Sep 10 03:52:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60054 <60054@debbugs.gnu.org> To: bug#60054 <60054@debbugs.gnu.org> Subject: Status: 29.0.60; Infinite loop when there are cyclic path in the parse tree Reply-To: bug#60054 <60054@debbugs.gnu.org> Date: Wed, 10 Sep 2025 10:52:24 +0000 retitle 60054 29.0.60; Infinite loop when there are cyclic path in the pars= e tree reassign 60054 emacs submitter 60054 Yuan Fu severity 60054 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 13 19:11:13 2022 Received: (at submit) by debbugs.gnu.org; 14 Dec 2022 00:11:13 +0000 Received: from localhost ([127.0.0.1]:35453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5FMf-0007YX-5x for submit@debbugs.gnu.org; Tue, 13 Dec 2022 19:11:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:50306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5FMd-0007YR-UY for submit@debbugs.gnu.org; Tue, 13 Dec 2022 19:11:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5FMc-0003Gh-Hy for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 19:11:11 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5FMY-0006HG-1v for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 19:11:10 -0500 Received: by mail-pj1-x102e.google.com with SMTP id js9so5152935pjb.2 for ; Tue, 13 Dec 2022 16:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=qMIY+EvuqKkq0afC5za8XRcyNpg+BhJ2GV53azAwtFQ=; b=B8qyT8FwOePtlcimcgWRSkfuoB9Y6GJ/+si0Gv2SDxRiyRmf070Dir3x3yAxSAKxZY A7CgG0CZN9ky9OjjM1lKMQq5e+OlOFmd1Y2OUDk4xArq3VZT8hOQX+Lwk6z6ug7XQBhH 6xiy9iyN8Fk1hYCBvefzet3hiQc3zEnbeEio3TjKmiXxJR0LRopBrL+t4MJvea4AQgQ2 0llW+IWAbMKgzhRKZPZFbGke/yXNzm7U2dmm/MPFlVyVO0E0B7bVCWKvwyFDMIDhpLrd IhaT01EoIEgEeCw4DuMoyICXe7m6ku6dHiF9qLrtYMPx6yDzMQqlCFN4ve/3lGS+lZbq MT6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qMIY+EvuqKkq0afC5za8XRcyNpg+BhJ2GV53azAwtFQ=; b=KssAKmKj/yFcjqOgzrTcsxzxVb/AiL/D0A9VqGMWOa1dbM9+hIce2drn1qzhmavHEN tIfPTgS0YJbLR7v/PdZVIGtQbYVgUecLK2MsIV4oQMGA65cNGpJZ5kzR3+cTbRYbd5/8 vLbTjk6vWdkv/mqJuHX1dBvqOiBjcTU8hSduXnrK//qroUUzWlbt5RgOfgx1f66TbRCr 4tSJwU1J4sNs6+mHAkYQc0kVtQD77jsdhtngcQn0yCoiRKOU6mQ1TE1xxZ6rkQBB/sKg Kt1P9De00Nq6fPMqZsl5HcnqjgVAr+z/OAY0d/8XaLZjeCSYOQPNxMcRXkO3jQmGFWgB iZqA== X-Gm-Message-State: ANoB5pm6w/li9lrlPRXHu81VQ2b0Gidk959sRqh0eOxLNC8Jy4Wgadbc pzk6onM2DiMRGo8jL7x2Q9ujmo+ljucWAA== X-Google-Smtp-Source: AA0mqf4lFIUt0KsHLDl3VnBuHK8z41R1Nd307bGQRup71ZSer3s1HpXeRoRFU3Op+9DiAGdCpeFfEw== X-Received: by 2002:a17:90b:3687:b0:21a:1793:5c99 with SMTP id mj7-20020a17090b368700b0021a17935c99mr22641819pjb.42.1670976664271; Tue, 13 Dec 2022 16:11:04 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id v24-20020a17090ac91800b00219dab2d7a0sm107296pjt.9.2022.12.13.16.11.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2022 16:11:03 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: 29.0.60; Infinite loop when there are cyclic path in the parse tree Message-Id: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> Date: Tue, 13 Dec 2022 16:11:01 -0800 To: Bug Report Emacs X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=casouri@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is not really an Emacs bug, but either tree-siter-c or tree-sitter=E2=80=99s. I=E2=80=99m putting it out here so that if I=E2=80=99= m hit by a bus tomorrow, and treesit-search-forward-goto and friends hang,=20 we (eh, you) know what=E2=80=99s going on. I=E2=80=99ve submitted an issue here: https://github.com/tree-sitter/tree-sitter-c/issues/119 So far, I=E2=80=99ve only observed this in that specific edge case. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 07:08:33 2022 Received: (at 60054) by debbugs.gnu.org; 14 Dec 2022 12:08:33 +0000 Received: from localhost ([127.0.0.1]:38764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5QYq-0005bu-Sr for submit@debbugs.gnu.org; Wed, 14 Dec 2022 07:08:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5QYp-0005bo-9f for 60054@debbugs.gnu.org; Wed, 14 Dec 2022 07:08:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5QYj-0002Mz-Uv; Wed, 14 Dec 2022 07:08:25 -0500 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=Tl+7pcSLfv4kLAMHdjN85GklzUpN7PhW+2xD4wBiN7Q=; b=VOlYEsn5HazhfmVGtubJ lrJ/RA3wCArperpsgs1RO26aGJDYMIKMnRodLyU5GSFmXEkeiUxpbx6LPPtcHjF37C9JT6lkLRzRL u0rM2zq/HG4UJTPYobgOf+bykaqA2XSaGbLOa8ZuYeYumkL1JHn8iBxCNdd+R/RsXTxctFvo+szl0 x796x5VIM0RQzciTMvZoAxgi4+8Mwwih/Y4TzDb0kQ23EI8i6PVLdPzUCUWCEHDsnswckCKrSG1Jf /dLYaI5KWc2vFTj+gfWYO+T3V6ZivxwIYDb/xL3z7CU+bT+AfoErh5diH4GZk+NNcvqRY7c6bvewO Ct3HoYASWSG69A==; Received: from [87.69.77.57] (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 1p5QYj-0004j6-Ej; Wed, 14 Dec 2022 07:08:25 -0500 Date: Wed, 14 Dec 2022 14:08:23 +0200 Message-Id: <83cz8mnq6g.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> (message from Yuan Fu on Tue, 13 Dec 2022 16:11:01 -0800) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree References: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Tue, 13 Dec 2022 16:11:01 -0800 > > > This is not really an Emacs bug, but either tree-siter-c or > tree-sitter’s. I’m putting it out here so that if I’m hit by a bus > tomorrow, and treesit-search-forward-goto and friends hang, > we (eh, you) know what’s going on. > > I’ve submitted an issue here: > https://github.com/tree-sitter/tree-sitter-c/issues/119 > > So far, I’ve only observed this in that specific edge case. We should have protection against that, which should be easy, right? From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 14 15:28:10 2022 Received: (at 60054) by debbugs.gnu.org; 14 Dec 2022 20:28:10 +0000 Received: from localhost ([127.0.0.1]:41411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5YML-0001NY-9d for submit@debbugs.gnu.org; Wed, 14 Dec 2022 15:28:10 -0500 Received: from mail-pl1-f177.google.com ([209.85.214.177]:38777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5YMH-0001N7-Mi for 60054@debbugs.gnu.org; Wed, 14 Dec 2022 15:28:07 -0500 Received: by mail-pl1-f177.google.com with SMTP id s7so4593038plk.5 for <60054@debbugs.gnu.org>; Wed, 14 Dec 2022 12:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TybkDbOsOzP/CZtOip5Rklkkq/aZ8GbRE8aifEmb4qw=; b=Bm+/4KNscVMmaYM3fD9DTovpM+XmqaoTWFnmQTE735AQabMXf54gJc1sIDWQhyUAIL uPPUcGotNplBT/uJzNTQcfkciWeMslTD7f8b4dBTCz4FxSf01Y1ad7pc/1rFenCRYG8a g99J4ORtH7tkc+B0bCtvQp0CROjQLvdNf3ePVvL+Ga6bM3gLMjx/iBH/0M/VDlEyEtEl 42KBuENCt/16STXedeJ9+Farf2jPJrT5ukMB2w6OZ2NwoptmNzVkQeToZmHacS15zSIN WHE1kD3f/Y+boc/fDwvbyvRBIqLUBrnIBNrbBB0Oy6YBjuL7xnYA+wVQghAS1EELU72m UY+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TybkDbOsOzP/CZtOip5Rklkkq/aZ8GbRE8aifEmb4qw=; b=mwse2gmqE53iAmPPM4umaEd8RBjl+o0dMto1FfEVBQdzkoOzrzKhtbFiBf+tkBeM/E Y0Li3Q5anLPErF8/gvylOtTq8dQyf19pobnLHlIG6iHXUbh9v8s9Uc4okSUGUpFSEdwp sZZnHr5LpWhRWZCRSK66fLJ6qBkL5gay9EgUInCDl5hT85uu7WXds4rEbzhvwbSF+Zyk p5wA72+ykrCZsR55N3Y6zVTJevsYBb7pKbowF7VmlrxAc+S35m0Ye02LkctiFB06a+zv EpH5p9aGGPt02yUy1ZpZukUFSve/8S8D36mZiwNHnsN+0h+vDgqB+ApYk22u3Hi9vtp1 r3Eg== X-Gm-Message-State: ANoB5pmemgD6+QychIsu6aRu0nWkBjl+yZBxLwD25Cmn4PdyLwznTNI0 DpDQf9bcOyufFlKLG2IAcY6GdatF7eazjw== X-Google-Smtp-Source: AA0mqf5aXLUd7XlNwtZpFP4WggY8T3SJ9t3f8IFtddZBA0RsghtQQllkroNIA+ubFUVSV+wuKNjUIw== X-Received: by 2002:a17:902:a38e:b0:189:76ef:a1b0 with SMTP id x14-20020a170902a38e00b0018976efa1b0mr26606122pla.57.1671049679753; Wed, 14 Dec 2022 12:27:59 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id w20-20020a170902ca1400b0018930dbc560sm2280234pld.96.2022.12.14.12.27.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2022 12:27:59 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree From: Yuan Fu In-Reply-To: <83cz8mnq6g.fsf@gnu.org> Date: Wed, 14 Dec 2022 12:27:58 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> <83cz8mnq6g.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Dec 14, 2022, at 4:08 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Tue, 13 Dec 2022 16:11:01 -0800 >>=20 >>=20 >> This is not really an Emacs bug, but either tree-siter-c or >> tree-sitter=E2=80=99s. I=E2=80=99m putting it out here so that if = I=E2=80=99m hit by a bus >> tomorrow, and treesit-search-forward-goto and friends hang,=20 >> we (eh, you) know what=E2=80=99s going on. >>=20 >> I=E2=80=99ve submitted an issue here: >> https://github.com/tree-sitter/tree-sitter-c/issues/119 >>=20 >> So far, I=E2=80=99ve only observed this in that specific edge case. >=20 > We should have protection against that, which should be easy, right? Just to make sure, we want to use something like slow-fast pointers, = where we have two pointers, and one goes twice as fast, right? That=E2=80=99= s the one I was taught in school :-) The author advices to use cursors for traversing the tree, as cursors = doesn=E2=80=99t have this bug. He also advised against using = ts_node_parent and said that they could be removed in the future. I = didn=E2=80=99t use cursors in the first place because they can=E2=80=99t = traverse the tree backwards, ie, no equivalent of ts_node_prev_sibling, = and the performance difference is not significant in Emacs settings. But = I just went to look at the source, and it seems = ts_node_prev_siblings(node) is implemented by just iterating each = children from first to last, until it finds the child just before NODE, = LOL[1]. I can do similar things in treesit.c with cursors. By doing that = we can fix this problem and be future-proof. In summary, I=E2=80=99m proposing:=20 1. I add the slow-fast pointer checks in treesit.c and treesit.el 2. I replace ts_node_parent/sibling/child with using cursors in = tree-traversal functions in treesit.c. Yuan [1] static inline TSNode ts_node__prev_sibling(TSNode self, bool = include_anonymous) { Subtree self_subtree =3D ts_node__subtree(self); bool self_is_empty =3D ts_subtree_total_bytes(self_subtree) =3D=3D 0; uint32_t target_end_byte =3D ts_node_end_byte(self); TSNode node =3D ts_node_parent(self); TSNode earlier_node =3D ts_node__null(); bool earlier_node_is_relevant =3D false; while (!ts_node_is_null(node)) { TSNode earlier_child =3D ts_node__null(); bool earlier_child_is_relevant =3D false; bool found_child_containing_target =3D false; TSNode child; NodeChildIterator iterator =3D ts_node_iterate_children(&node); while (ts_node_child_iterator_next(&iterator, &child)) { if (child.id =3D=3D self.id) break; if (iterator.position.bytes > target_end_byte) { found_child_containing_target =3D true; break; } if (iterator.position.bytes =3D=3D target_end_byte && (!self_is_empty || = ts_subtree_has_trailing_empty_descendant(ts_node__subtree(child), = self_subtree))) { found_child_containing_target =3D true; break; } if (ts_node__is_relevant(child, include_anonymous)) { earlier_child =3D child; earlier_child_is_relevant =3D true; } else if (ts_node__relevant_child_count(child, include_anonymous) = > 0) { earlier_child =3D child; earlier_child_is_relevant =3D false; } } if (found_child_containing_target) { if (!ts_node_is_null(earlier_child)) { earlier_node =3D earlier_child; earlier_node_is_relevant =3D earlier_child_is_relevant; } node =3D child; } else if (earlier_child_is_relevant) { return earlier_child; } else if (!ts_node_is_null(earlier_child)) { node =3D earlier_child; } else if (earlier_node_is_relevant) { return earlier_node; } else { node =3D earlier_node; } } return ts_node__null(); } From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 01:16:48 2022 Received: (at 60054) by debbugs.gnu.org; 15 Dec 2022 06:16:48 +0000 Received: from localhost ([127.0.0.1]:42398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5hXz-0006s6-RA for submit@debbugs.gnu.org; Thu, 15 Dec 2022 01:16:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5hXx-0006s0-Cr for 60054@debbugs.gnu.org; Thu, 15 Dec 2022 01:16:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5hXs-0002eh-5z; Thu, 15 Dec 2022 01:16:40 -0500 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=h2EIi3H6WLFdUOE3g28Pwnfa9K/xJfn1D4Y951ae4O8=; b=MfYc7X5JKyTif8VpoFWi t65c6gFU+FpBAufeFQtSZG2U7za3nyBt+1BumxJfmFGNwtfAqElkubqbd8c+MMo5e5qwUsw3rKvZ3 Y5S3AsMynXEl79h6KJWBmfKuagySgW5sl1EVKrQza1rRQugySgMWDteBRxOY3GfmBinjnA2N3vk2x qsA82mno61C0hqBMYH0Q3zCu83sb5azCOMRT/uA642JYs40rfiaviUUhMXR20EC+rVB8MhBpYHSRr Mw70cgnmE/G2aV7QUsFXW+UREXBiGfnlwVUxp88MK4xYWv98yuMaBq1SVm/bfAkE/RgzL+hFrnjJl ctRi7XbiIqKLcg==; Received: from [87.69.77.57] (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 1p5hXr-0007Ny-J9; Thu, 15 Dec 2022 01:16:39 -0500 Date: Thu, 15 Dec 2022 08:16:39 +0200 Message-Id: <834jtxmbso.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: (message from Yuan Fu on Wed, 14 Dec 2022 12:27:58 -0800) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree References: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> <83cz8mnq6g.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Wed, 14 Dec 2022 12:27:58 -0800 > Cc: 60054@debbugs.gnu.org > > >> https://github.com/tree-sitter/tree-sitter-c/issues/119 > >> > >> So far, I’ve only observed this in that specific edge case. > > > > We should have protection against that, which should be easy, right? > > Just to make sure, we want to use something like slow-fast pointers, where we have two pointers, and one goes twice as fast, right? That’s the one I was taught in school :-) No, I mean protect us from inflooping by checking that the parent of a node is not the node itself. > In summary, I’m proposing: > 1. I add the slow-fast pointer checks in treesit.c and treesit.el > 2. I replace ts_node_parent/sibling/child with using cursors in tree-traversal functions in treesit.c. SGTM, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 20:14:48 2022 Received: (at 60054) by debbugs.gnu.org; 16 Dec 2022 01:14:48 +0000 Received: from localhost ([127.0.0.1]:46009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zJH-0006mu-NE for submit@debbugs.gnu.org; Thu, 15 Dec 2022 20:14:47 -0500 Received: from mail-pl1-f174.google.com ([209.85.214.174]:44559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5zJE-0006mm-M7 for 60054@debbugs.gnu.org; Thu, 15 Dec 2022 20:14:47 -0500 Received: by mail-pl1-f174.google.com with SMTP id g10so778620plo.11 for <60054@debbugs.gnu.org>; Thu, 15 Dec 2022 17:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=zE7NZ91XAjO6ttubBakHF8mCPxYV/25tpoZaWuKVgUI=; b=F7R0ujdcmfCiqnWJOtk7VuvYTpebBZF6qZIOa/6f7qbdY0Vwer0WgR2LW0vspOy/RE l1/fZqoMWKa60qSZ6lTwXWeRl5dNjszsm9YbOhLqZmFuss5H08G+x/lIKFBTCs8QFxIC 5EyEQ5v8RwdQTsx6c88L2FNF26I0a7xg9zzLXJUeAmH4bGfm0HpYhztC0tdFOpwFcm7C rpGrFyUh304OV0fcAkdjr7TKGprhn+O7y/WL66/bNcCWKzPj0UI8h5SNKj+NfMhW7uQj gjghA9bArwMP/h7KwDmWC08LFyW7NyinN+ehATwx5jh95fztVmNZxMiA3VbNe6Ml+wjy +GeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zE7NZ91XAjO6ttubBakHF8mCPxYV/25tpoZaWuKVgUI=; b=1XBbVCJWqLL0+X6ijRhoffBHshYCQI4KhCAXwY5rrx37rmPxZOjbnk0LfFqJefpBc3 Bw9LVc+IDwIYuI2oiuR/5dmU4xGij095+/aRuy+O7JuUbIHM0KS5R72y6yGFBUFW6IDX QSshk7DYMbZqQrnElujc2AJKXKKBhOVGXau4wuklaV7ppJgOUi1T3bIP+MhLM0hWU+bC cl1TXCtLlTb7HcMz6VHTkryqrFGklJx4/oZKsKBU2CRRVUEukGqyEECfcDmfYUnZ3hPI f3piDnLwss21NTofP0E2MZlROiYVt/ytwLR4AZ/XpeueBfnCODjDdNznUYUhT8DjLm6M ORxA== X-Gm-Message-State: ANoB5pm72KEfekhGiSQI0URUEqQFB64FQ1gwozwypeqG27if0Zrx6Rf+ ORWeJiNlaphSAomUVdp/bH2FimfFwn0= X-Google-Smtp-Source: AA0mqf4imj0kFrxvvuA4zWOafNASy3sdbJSXCYU+d7G59SWqjL8056lu/r1NRCbXBxb1rGMqAthy7w== X-Received: by 2002:a17:902:8bca:b0:188:b084:7bef with SMTP id r10-20020a1709028bca00b00188b0847befmr29359191plo.42.1671153278161; Thu, 15 Dec 2022 17:14:38 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id ix6-20020a170902f80600b00190cabbe35fsm268658plb.98.2022.12.15.17.14.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2022 17:14:37 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree Message-Id: <46BB7A11-4231-4549-A126-618ACBD1B60E@gmail.com> Date: Thu, 15 Dec 2022 17:14:36 -0800 To: Eli Zaretskii X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Yuan Fu >> Date: Wed, 14 Dec 2022 12:27:58 -0800 >> Cc: 60054@debbugs.gnu.org >>=20 >> >> https://github.com/tree-sitter/tree-sitter-c/issues/119 >> >>=20 >> >> So far, I=E2=80=99ve only observed this in that specific edge = case. >> >=20 >> > We should have protection against that, which should be easy, = right? >>=20 >> Just to make sure, we want to use something like slow-fast pointers, >> where we have two pointers, and one goes twice as fast, right? >> That=E2=80=99s the one I was taught in school :-) > > No, I mean protect us from inflooping by checking that the parent of a > node is not the node itself. In this particular case, it is the siblings=E2=80=99 parent that equals = to the node. Ie, node->sibling->parent =3D node. If your intention is to = protect us from this particular case, switching to use cursors will avoid this bug. Yuan From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 17 18:28:11 2022 Received: (at 60054) by debbugs.gnu.org; 17 Dec 2022 23:28:11 +0000 Received: from localhost ([127.0.0.1]:58567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6gbC-0003Fl-WC for submit@debbugs.gnu.org; Sat, 17 Dec 2022 18:28:11 -0500 Received: from mail-pj1-f51.google.com ([209.85.216.51]:37527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6gbB-0003Ff-3A for 60054@debbugs.gnu.org; Sat, 17 Dec 2022 18:28:09 -0500 Received: by mail-pj1-f51.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so9589695pjj.2 for <60054@debbugs.gnu.org>; Sat, 17 Dec 2022 15:28:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=IYL2ES70ySK/T2ONlA+YdHgkmaDazH3+zObfh6h1M3g=; b=nGmmB0WhSeac47x2n12/6QycdyDq2rZpAsVIhMEeQXPXxso6V/KAouOuC9C2iJ6Im/ 84ACLMzJfW0ccGBoZkLrJHrYajjnMOfJoH0C70Rb1vnSPHfXuVnhZj9hB5yrFnN8OywI ykBlVryXLPObZJmI6KGtiQGEJRGj2MwEys8MEqwq0107/GSm2iP6oSWW17jnpwdp9hgp p8dXo/DSRbZRme2WQno8dZX17Ciga2b84qM498s4tiwhyIUaM1l1nNnp6VFY6ZzcBFFx n8ZZuzlffX6B7dNGRxSEcUie7PbWXuq0t7MQowVz7bPUU3lE8o4QgdA32L1KMby1J1Uq 5BbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IYL2ES70ySK/T2ONlA+YdHgkmaDazH3+zObfh6h1M3g=; b=HdPilcrcmLlFOhboTyEL9p3mhjmPL7tRV5G/hgufNg8tbB9uvDkfnIgWLKj2xfFSOS /4ephuKxTpzHtEMMqzfX2PhOJz2/ESM/abgRYyxYEYJEjrK/l/AJAVmNjV/qzZ6fnvU0 qSdaSvihX7SaAA5UkliKHk/LMwIK4AtpZYGWJsglS2FeDIDnfJPS9jyvMY3xQC//ofC7 eamwRH4/SFzKJkXG+9+X9NqpP8D2cuQy11kbbwPPoDZNpt5La4bNeX/TZPLONzdcw/h0 m0vkQmEh4UBb9SEBmNrK4+r/jTEcWgmgU1RkuBKZBdawhlo9lG1fx12XnL2S1abw79Ti jsSQ== X-Gm-Message-State: ANoB5pm5n+jlFAYaXkOCWiUkeGwnG51m6fQfm5VUJB182SE+xLGSR5e6 tu2RuERf2KIqLwK4nYgs9ek/BZjSjSo= X-Google-Smtp-Source: AA0mqf6G+W2ypPXWVKQR2DN9ZCiQOUz9uHKruGxXBwoq0UkYa6oQjYPKw6XDK0xufIeZqasqzvi2vg== X-Received: by 2002:a17:902:6bcc:b0:188:5b7d:738a with SMTP id m12-20020a1709026bcc00b001885b7d738amr36469062plt.29.1671319683211; Sat, 17 Dec 2022 15:28:03 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id z9-20020a1709027e8900b001910b21fe90sm2434824pla.210.2022.12.17.15.28.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2022 15:28:02 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree Message-Id: <23FFD6B5-D97E-4BEC-9027-EF47EBE89BD6@gmail.com> Date: Sat, 17 Dec 2022 15:28:01 -0800 To: Eli Zaretskii X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuan Fu writes: > Eli Zaretskii writes: > >>> From: Yuan Fu >>> Date: Wed, 14 Dec 2022 12:27:58 -0800 >>> Cc: 60054@debbugs.gnu.org >>>=20 >>> >> https://github.com/tree-sitter/tree-sitter-c/issues/119 >>> >>=20 >>> >> So far, I=E2=80=99ve only observed this in that specific edge = case. >>> >=20 >>> > We should have protection against that, which should be easy, = right? >>>=20 >>> Just to make sure, we want to use something like slow-fast pointers, >>> where we have two pointers, and one goes twice as fast, right? >>> That=E2=80=99s the one I was taught in school :-) >> >> No, I mean protect us from inflooping by checking that the parent of = a >> node is not the node itself. > > In this particular case, it is the siblings=E2=80=99 parent that = equals to the > node. Ie, node->sibling->parent =3D node. If your intention is to = protect > us from this particular case, switching to use cursors will avoid this > bug. Ok, I made the change to use cursor API with tests. Hopefully this is the last time we need to change treesit.c before release. The node->sibling->parent =3D node cyclic path should be fixed by this = change, do you still want checks for it? Yuan From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 18 01:00:42 2022 Received: (at 60054) by debbugs.gnu.org; 18 Dec 2022 06:00:43 +0000 Received: from localhost ([127.0.0.1]:60158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6mj4-0001FD-M8 for submit@debbugs.gnu.org; Sun, 18 Dec 2022 01:00:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6mj2-0001F5-Pf for 60054@debbugs.gnu.org; Sun, 18 Dec 2022 01:00:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6miw-0006Nl-1Y; Sun, 18 Dec 2022 01:00:35 -0500 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=Y2gyyulh04LBrf70OYCT1jJ06g6YzxsFGUdYTMbwYqg=; b=pRVlVgMgsAPMmR8jO6u9 lxLkICyAIIB/xA91eKtCdhZAyB/1fThWAi1t18bgW4mEP999J+yO4/9+rCllmSGFnKy3KLY8YTyJK TV8oQPk95WtkVM3WDDUJjDk2AAuL2iisK15sURUJDUOsyCnuYG8TPyPwcVxCueKavyCpu9OUS7VvX I+M1dO3Lk8BnG7jASIQmtXQl8zyQwHzk+Q73FWViGn0r/0WIYplEWy9WBS7AkMo6ccp03r+aU8RQr mMXjx5PSAmTz6Ky7aJXyxcmpOecFazrIHEoUyajWqAyYpRX5U4me9ruNyEZZH4EvI+fjzkxE5FFlA Qo8ri7qUhrVN4g==; Received: from [87.69.77.57] (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 1p6miu-0005cI-3e; Sun, 18 Dec 2022 01:00:33 -0500 Date: Sun, 18 Dec 2022 08:00:39 +0200 Message-Id: <831qoxgsjc.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <23FFD6B5-D97E-4BEC-9027-EF47EBE89BD6@gmail.com> (message from Yuan Fu on Sat, 17 Dec 2022 15:28:01 -0800) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree References: <23FFD6B5-D97E-4BEC-9027-EF47EBE89BD6@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60054 Cc: 60054@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Sat, 17 Dec 2022 15:28:01 -0800 > Cc: 60054@debbugs.gnu.org > > > In this particular case, it is the siblings’ parent that equals to the > > node. Ie, node->sibling->parent = node. If your intention is to protect > > us from this particular case, switching to use cursors will avoid this > > bug. > > Ok, I made the change to use cursor API with tests. Hopefully this is > the last time we need to change treesit.c before release. This broke the Windows build (I fixed it). You cannot start using new tree-sitter functions without adding the boilerplate code for loading them dynamically from the shared library at run time. > The node->sibling->parent = node cyclic path should be fixed by this > change, do you still want checks for it? If that problem can never happen, there's no need for the checks. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 18 03:10:33 2022 Received: (at 60054-done) by debbugs.gnu.org; 18 Dec 2022 08:10:33 +0000 Received: from localhost ([127.0.0.1]:60710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6oki-000364-LS for submit@debbugs.gnu.org; Sun, 18 Dec 2022 03:10:32 -0500 Received: from mail-pf1-f178.google.com ([209.85.210.178]:44576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6okg-00035y-Du for 60054-done@debbugs.gnu.org; Sun, 18 Dec 2022 03:10:30 -0500 Received: by mail-pf1-f178.google.com with SMTP id d82so4328758pfd.11 for <60054-done@debbugs.gnu.org>; Sun, 18 Dec 2022 00:10:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=J5jAi54ep7yyVEvcCwAmNu/VilrLLpGgG5kL9TcO3wk=; b=VdOAUdbnuIry91JfKDr1FxYreUZiGY5+3dQt3kV6MNcuTgekvNSSDIfHzpZ6zEk2aG y+PO07fBgPpNZBOi1LOTCRalQk7vT4GoVSN81OXalfIaYCmt9FAEDRdw0oTuYuplCd66 ljZpRvd4sb6u8xBybN0dIvtchEkZdH8AsWcIQyoc49yqYkil10qUWf6hvSDLU9/cXUzc GNv/VZOYtUMCafCBECL9l4IyKaIgi+0OmO4zC0OWfNTVowCRMZj9Pc3Q3RizZYNl/zVu HVHbxOkzDlizlXw4wiChkvGmL3YpLK6YRedib7oGa2380vJmi3e+vN4oXi4BcNpC0SBU pT1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J5jAi54ep7yyVEvcCwAmNu/VilrLLpGgG5kL9TcO3wk=; b=4Craber+UUmjBCumvhyzO1PrmIz+A120Zauy5+aixSfWz2n4P+dkaMhVZtwAloBSj+ P77SJIBDd9gun2I2Oga3ZLdC1UQvgbO52pJg3hXJnQVpTwO5/NWcA+hz/FudjdeEGwDs +oJiCmtYTNnQAkkrXQ5bmhIduvFZOwflinPjeXfiKkFNALtXLlTN5U/x0dG1Pj5ebhyg LOEdJLwyGyjhfAGaOF0v/lj7XLi6QMFTJqpFarBkd7w47/pKE7mt+2plMXpLZ39I3g6C mI2K4f5CwxOzXW+3QPpPiTrsq36r+JD02kJcH+THZROVuOEMoRec3xE2dnl24p6Hbbcb g7BA== X-Gm-Message-State: ANoB5pl7Lk1XBxCmqi8qUhvXDyr3rOHvWTs5O7RNH5o91Pn6uTKUIaFw 34207yLgVFbHS30vBG/Dt8TVqxyZule/9A== X-Google-Smtp-Source: AA0mqf66ngi52s/HMp0E6g6Yq8RpC3gXocVqwlPgjWp1Wm8zNEO3QgNTDksgIo9W+ptRqERBz4WzdQ== X-Received: by 2002:a62:f251:0:b0:577:ad:49c5 with SMTP id y17-20020a62f251000000b0057700ad49c5mr34038715pfl.9.1671351024631; Sun, 18 Dec 2022 00:10:24 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y17-20020aa79af1000000b005747b59fc54sm4303678pfp.172.2022.12.18.00.10.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2022 00:10:24 -0800 (PST) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree Message-Id: Date: Sun, 18 Dec 2022 00:10:23 -0800 To: Eli Zaretskii X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60054-done Cc: 60054-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Yuan Fu >> Date: Sat, 17 Dec 2022 15:28:01 -0800 >> Cc: 60054@debbugs.gnu.org >>=20 >> > In this particular case, it is the siblings=E2=80=99 parent that = equals to the >> > node. Ie, node->sibling->parent =3D node. If your intention is to = protect >> > us from this particular case, switching to use cursors will avoid = this >> > bug. >>=20 >> Ok, I made the change to use cursor API with tests. Hopefully this is >> the last time we need to change treesit.c before release. > > This broke the Windows build (I fixed it). You cannot start using new > tree-sitter functions without adding the boilerplate code for loading > them dynamically from the shared library at run time. Ah right, it evaded my mind, sorry about that. >> The node->sibling->parent =3D node cyclic path should be fixed by = this >> change, do you still want checks for it? > > If that problem can never happen, there's no need for the checks. Cool. I=E2=80=99m closing this. Yuan From unknown Wed Sep 10 03:52:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 15 Jan 2023 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator