From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#60054: 29.0.60; Infinite loop when there are cyclic path in the parse tree Date: Sun, 18 Dec 2022 00:10:23 -0800 Message-ID: References: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16118"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60054-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 18 09:11:55 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 1p6om2-00043s-Q0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 09:11:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6olM-0003GV-7N; Sun, 18 Dec 2022 03:11:12 -0500 Original-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 1p6olG-0003Fu-30 for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 03:11:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6olC-00016W-Ar for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 03:11:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6olC-00036P-0l for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 03:11:02 -0500 In-Reply-To: <0998189C-4A9E-4B27-A8A0-D208D11E9A39@gmail.com> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 08:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 60054 X-GNU-PR-Package: emacs Mail-Followup-To: 60054@debbugs.gnu.org, casouri@gmail.com, casouri@gmail.com Original-Received: via spool by 60054-done@debbugs.gnu.org id=D60054.167135103311912 (code D ref 60054); Sun, 18 Dec 2022 08:11:01 +0000 Original-Received: (at 60054-done) by debbugs.gnu.org; 18 Dec 2022 08:10:33 +0000 Original-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 Original-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 Original-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) Original-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) X-Mailer: Apple Mail (2.3696.120.41.1.1) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251337 Archived-At: 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