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#71012: 30.0.50; tree-sitter crash Date: Thu, 25 Jul 2024 00:26:30 -0700 Message-ID: References: <87ttiwpng0.fsf@gmail.com> <86wmnsfodz.fsf@gnu.org> <6F195712-81CE-4C75-8983-D1D909646CAC@gmail.com> <86zfs8ssyj.fsf@gnu.org> <6FC1345F-B7CE-4A95-84BA-E559D5A963E1@gmail.com> <792DB4FC-EB1E-4094-A4CF-14500DDA82C1@gmail.com> <87h6e52lkw.fsf@epfl.ch> <87r0d12hlw.fsf@epfl.ch> <87y15qrg5q.fsf@epfl.ch> <86cyn27nuo.fsf@gnu.org> <87frrywemm.fsf@epfl.ch> <86sevy59dj.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) 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="23882"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71012@debbugs.gnu.org, Helmut Eller , "Basil L. Contovounesios" To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 09:28:13 2024 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 1sWstY-0005wl-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 09:28:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWstJ-00025h-CV; Thu, 25 Jul 2024 03:27:57 -0400 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 1sWstI-00021p-CT for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:27:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWstH-0005G4-Al for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:27:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWstO-0005E7-4p for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 07:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71012 X-GNU-PR-Package: emacs Original-Received: via spool by 71012-submit@debbugs.gnu.org id=B71012.172189247220076 (code B ref 71012); Thu, 25 Jul 2024 07:28:02 +0000 Original-Received: (at 71012) by debbugs.gnu.org; 25 Jul 2024 07:27:52 +0000 Original-Received: from localhost ([127.0.0.1]:35363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWstE-0005Dj-Dq for submit@debbugs.gnu.org; Thu, 25 Jul 2024 03:27:52 -0400 Original-Received: from mail-pl1-f169.google.com ([209.85.214.169]:51615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWstC-0005Dc-MC for 71012@debbugs.gnu.org; Thu, 25 Jul 2024 03:27:51 -0400 Original-Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1fd640a6454so5683945ad.3 for <71012@debbugs.gnu.org>; Thu, 25 Jul 2024 00:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721892403; x=1722497203; darn=debbugs.gnu.org; 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=clP8pCTdy+bRjxIukh59ssvOJh+AA0cwNz7sUnqNVdI=; b=OF8J9G5jnJalFundfClZ968RAFg1EPhGrBTFMLfWGVk82wPf/8/sekhh4a53l3YuUJ 8urG6fwTuIE3IFbadcszkzWxGiMva//0u3vgys56VvSAdT8YsHwmB0NFITOmNmlg/G8W fDVcMu4knv2k18GKYv2fDejUyHicQ7XrPc7Izvz1VN8pUfDeplXdC/sZxb1Ia6R2pqIH 64S9hnWog3XPtMs/C3CmHskmAoaPA2vmEKwfMwGUZKik4n1Bx/jMhdM59TnMRk8UGlv1 VQB6KyYWFhVrW+/j2BjQTUhg0gfzFNZNVQQ6v/0uVhKVnwuNY7ymv+gTDgqIOgPhLqm9 jg8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721892403; x=1722497203; 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=clP8pCTdy+bRjxIukh59ssvOJh+AA0cwNz7sUnqNVdI=; b=IQEGqHVsUzKDIdOTSfTUWt4wAUGxAMxZ7dhjROGK51s9VgpzODGle4c2B94wVMAp4V zHoWOewCKETkTc+U8cVemZo7VkHbD36L65ZpuxuMqGg/YlxTjGt91zBaxVwkVzhQOX94 ma2t+rSjKbELeOxdeqVb7wwkbvHCj3P/jBccM5jY5BySzVqLI2LcmuX875wuGlDFRDvX tujSntRkO/tLzUhTxpJrvwG69unypvOpo4FV24Cvul5jETvFfAGWMQ1GYIYXVNnmZLK7 fGGKGWf91Zlnjq39YMdi+BTRtd3BWeg7QRhfSBfNWcNGveKvUT6E1RBZZWQD0Fazz122 yOyA== X-Forwarded-Encrypted: i=1; AJvYcCUpJ2nX5cr3jbkXW4iIZMpYHquX+H/tyIDqcmsTvEZoVI11bq4vpDiCh4sLclXilRHVyZcpOzxAHgaQaOWTlpwxQqCPTp4= X-Gm-Message-State: AOJu0Yylvusx9j0pJHRCrMWxNWZ7jJfS4YMq6KMrwYhi+cqo7NOMCxiz GG+xUknmA9wTdTeQK0JuB4UzcSv1VUSZYjS/hNpLO9p3OkKxQzPG X-Google-Smtp-Source: AGHT+IEZSzEkjwRIiYYl9Xr75lbkQqBn87ZFk/rQmx1/jAhY9eibnpjb4zTEYrbxoo6yEheV9OLI+A== X-Received: by 2002:a17:902:f68a:b0:1fb:35c7:8ea4 with SMTP id d9443c01a7336-1fed353547cmr22033565ad.2.1721892402564; Thu, 25 Jul 2024 00:26:42 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f9a7:9274:d0c2:c842]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ee4e79sm7324025ad.138.2024.07.25.00.26.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2024 00:26:41 -0700 (PDT) In-Reply-To: <86sevy59dj.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) 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:289277 Archived-At: > On Jul 24, 2024, at 10:27=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> From: "Basil L. Contovounesios" >> Cc: casouri@gmail.com, 71012@debbugs.gnu.org, = eller.helmut@gmail.com >> Date: Thu, 25 Jul 2024 01:32:01 +0200 >>=20 >> Eli Zaretskii [2024-07-24 19:31 +0300] wrote: >>=20 >>>> Cc: 71012@debbugs.gnu.org, eller.helmut@gmail.com >>>> From: "Basil L. Contovounesios" >>>> Date: Wed, 24 Jul 2024 16:57:53 +0200 >>>>=20 >>>> Ping: thoughts on whether this is an issue? >>>=20 >>> Thoughts about what? what is deemed to be a problem in this case? >>=20 >> That each call to treesit-parse-string now allocates a new internal >> buffer which is not automatically GCed. >>=20 >> If this cannot be avoided, I think the docs should at least warn that >> it's the caller's responsibility to kill the return node's buffer = when >> finished with it. >=20 > If the buffers aren't killed by the code, it's indeed an issue that > needs to be solved. At the time I suggested that the node's buffer is > killed when the node is GC'ed or deleted -- have this not been done? No. I think it=E2=80=99s best to implement treesit-parse-string in C = with ts_parse_string now. That way we don=E2=80=99t need to worry about = the temp buffer. Yuan