From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 14:03:18 2024 Received: (at submit) by debbugs.gnu.org; 12 Sep 2024 18:03:18 +0000 Received: from localhost ([127.0.0.1]:41883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sooA1-0000D8-MF for submit@debbugs.gnu.org; Thu, 12 Sep 2024 14:03:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:43654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1somZv-0002z3-ET for submit@debbugs.gnu.org; Thu, 12 Sep 2024 12:21:56 -0400 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 1somZn-0005bo-7Y for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 12:21:47 -0400 Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1somZk-0001QX-At for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 12:21:46 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1726158092; cv=none; d=zohomail.com; s=zohoarc; b=MHmbaejSbK1BadY/zNpBx9IpMclbKpIBYYeGCLn+Cof7P5ZgvnKgEp8kTcQJ0O6sQk5Gs7k+yYiO5xdyPyvWXwZZomopmpLKsXVUayALj02sW8o3KieBumGmQAi8fzZnUkZAjLd93lq7kxXs/J5Ez5Slcy7BnEEOwC/U1e28YZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726158092; h=Content-Type:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=56sQPLvDmU/mZte+WrjahwXvGtChmB15C4MiVpOTGYU=; b=i8l9+niUX8mUAf4hUljZfQpJff0Ztx8Vx2S+otJ4x/WEt7Xla9snLQcsBSSYVU+plQUGmI7ZznUrdAXqn2zieic2HFMPXg4w8NwfMyVgGy8UCUANVq1aZwrWoP9rtyWmisb25lS8EsSa9SkY7iRAXVJcSCRbOncYDf3hea+bYbU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=vinurs.me; spf=pass smtp.mailfrom=hi@vinurs.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1726158092; s=zmail; d=vinurs.me; i=hi@vinurs.me; h=Date:Date:From:From:To:To:Message-ID:Subject:Subject:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=56sQPLvDmU/mZte+WrjahwXvGtChmB15C4MiVpOTGYU=; b=OD/M13rSO6qgsjs4+1fUwW3pbSB0arREs1JYUbKeKEfsiwjTPtfNNVlkNg0pQ8cd cAfMITtLuK4xi3Taj6zJ0KTpEhW6zk2tJLUB3snGfecOslkJoRhm1S9Up/zWMTOmLqN hMxZfalW+InfwetrZjK7Qyf+QE4eEdUq9CHxMjSM= Received: by mx.zohomail.com with SMTPS id 1726158091272624.022451906038; Thu, 12 Sep 2024 09:21:31 -0700 (PDT) Date: Fri, 13 Sep 2024 00:21:21 +0800 From: vinurs To: bug-gnu-emacs@gnu.org Message-ID: Subject: Tree-sitter in clojure-ts-mode causes memory leak during parsing MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="66e31506_4a411b16_3c1" X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-1.3.1/223.982.64 Received-SPF: pass client-ip=136.143.188.15; envelope-from=hi@vinurs.me; helo=sender4-op-o15.zoho.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-Mailman-Approved-At: Thu, 12 Sep 2024 14:03:17 -0400 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 (--) --66e31506_4a411b16_3c1 Content-Type: multipart/alternative; boundary="66e31506_5bff4eb5_3c1" --66e31506_5bff4eb5_3c1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I am using the precompiled version from https://emacsformacosx.com/builds= =C2=A0 https://emacsformacosx.com/emacs-builds/Emacs-2024-09-11=5F00-09-10-69e1a= ca041c57ba425425d31471e1c8f86d3bf04-universal.dmg I have chosen the latest Emacs 30 version. The min configuration is as fo= llows: (add-to-list 'treesit-extra-load-path (expand-file-name =22tree-sitter/=22= user-emacs-directory)) (add-to-list 'load-path =22=7E/.emacs.d/site-lisp/clojure-ts-mode=E2=80=9D= )=C2=A0 (require 'clojure-ts-mode)=C2=A0 =C2=A0;; debug=C2=A0 (setq debug-on-quit t) and I only use clojure-ts-mode package cd =7E/.emacs.d/site-lisp git clone https://github.com/clojure-emacs/clojure-ts-mode.git Then, after opening Emacs,=C2=A0 I opened the attached file b.clj, moved to line 57,=C2=A0 and entered the following characters:=C2=A0 (comment At this point, Emacs freezes and becomes unresponsive. I noticed that Ema= cs' memory usage keeps increasing: 2024-09-12 21:12:23: 806624 KB 2024-09-12 21:12:28: 810720 KB 2024-09-12 21:12:33: 829840 KB 2024-09-12 21:12:38: 1582256 KB 2024-09-12 21:12:43: 4678816 KB 2024-09-12 21:12:48: 7831776 KB 2024-09-12 21:12:53: 10982384 KB 2024-09-12 21:12:58: 14140048 KB 2024-09-12 21:13:03: 17296176 KB 2024-09-12 21:13:08: 20440960 KB 2024-09-12 21:13:13: 23583008 KB 2024-09-12 21:13:18: 26726272 KB 2024-09-12 21:13:24: 29857312 KB 2024-09-12 21:13:29: 33011456 KB 2024-09-12 21:13:34: 36156624 KB 2024-09-12 21:13:39: 38685440 KB 2024-09-12 21:13:44: 34858560 KB 2024-09-12 21:13:49: 30892768 KB Then, Emacs eventually gets killed by the system. The bt.log is the information I was able to retrieve ------------ Sincerely, --66e31506_5bff4eb5_3c1 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline