unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71012@debbugs.gnu.org, Helmut Eller <eller.helmut@gmail.com>,
	"Basil L. Contovounesios" <basil@contovou.net>
Subject: bug#71012: 30.0.50; tree-sitter crash
Date: Thu, 25 Jul 2024 00:26:30 -0700	[thread overview]
Message-ID: <F966CF04-EF36-46C1-BD91-03659B96B929@gmail.com> (raw)
In-Reply-To: <86sevy59dj.fsf@gnu.org>



> On Jul 24, 2024, at 10:27 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: "Basil L. Contovounesios" <basil@contovou.net>
>> Cc: casouri@gmail.com,  71012@debbugs.gnu.org,  eller.helmut@gmail.com
>> Date: Thu, 25 Jul 2024 01:32:01 +0200
>> 
>> Eli Zaretskii [2024-07-24 19:31 +0300] wrote:
>> 
>>>> Cc: 71012@debbugs.gnu.org, eller.helmut@gmail.com
>>>> From: "Basil L. Contovounesios" <basil@contovou.net>
>>>> Date: Wed, 24 Jul 2024 16:57:53 +0200
>>>> 
>>>> Ping: thoughts on whether this is an issue?
>>> 
>>> Thoughts about what? what is deemed to be a problem in this case?
>> 
>> That each call to treesit-parse-string now allocates a new internal
>> buffer which is not automatically GCed.
>> 
>> 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.
> 
> 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’s best to implement treesit-parse-string in C with ts_parse_string now. That way we don’t need to worry about the temp buffer.

Yuan






  reply	other threads:[~2024-07-25  7:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-17 13:39 bug#71012: 30.0.50; tree-sitter crash Helmut Eller
2024-05-17 15:29 ` Eli Zaretskii
2024-05-17 15:34   ` Helmut Eller
2024-05-17 16:00     ` Eli Zaretskii
2024-05-18  6:07   ` Yuan Fu
2024-05-27 22:10     ` Yuan Fu
2024-05-29  5:15       ` Yuan Fu
2024-05-29 12:28         ` Eli Zaretskii
2024-06-01 17:15           ` Yuan Fu
2024-06-01 17:43             ` Yuan Fu
2024-06-06  5:31               ` Yuan Fu
2024-06-07  8:39                 ` Basil L. Contovounesios
2024-06-10  8:12                   ` Basil L. Contovounesios
2024-06-10 18:25                     ` Eli Zaretskii
2024-06-12  5:38                       ` Yuan Fu
2024-06-12  5:38                   ` Yuan Fu
2024-06-13 11:43                     ` Basil L. Contovounesios
2024-06-13 11:53                       ` Basil L. Contovounesios
2024-07-24 14:57                       ` Basil L. Contovounesios
2024-07-24 16:31                         ` Eli Zaretskii
2024-07-24 23:32                           ` Basil L. Contovounesios
2024-07-25  5:27                             ` Eli Zaretskii
2024-07-25  7:26                               ` Yuan Fu [this message]
2024-07-25 10:40                                 ` Eli Zaretskii
2024-08-04  3:01                                   ` Yuan Fu
2024-08-24 22:30                                     ` Yuan Fu
2024-08-27 10:59                                       ` Basil L. Contovounesios
2024-08-28  4:28                                         ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F966CF04-EF36-46C1-BD91-03659B96B929@gmail.com \
    --to=casouri@gmail.com \
    --cc=71012@debbugs.gnu.org \
    --cc=basil@contovou.net \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).