GNU bug report logs - #62823
29.0.60; Fixing a small leak in tree-sitter search functions

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Thu, 13 Apr 2023 22:50:02 UTC

Severity: normal

Found in version 29.0.60

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 62823-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 62823-done <at> debbugs.gnu.org
Subject: Re: bug#62823: 29.0.60;
 Fixing a small leak in tree-sitter search functions
Date: Tue, 5 Sep 2023 16:55:36 -0700
Yuan Fu <casouri <at> gmail.com> writes:

> When we switch to using cursors instead of nodes [1] in treesit.c for
> search functions, we introduced a small leak: the search functions
> allows the user to pass a predicate function, which can signal. And
> because we are now using cursors, which needs to be freed, everytime the
> predicate function signals, the cursor is leaked.
>
> I pushed a fix to master (a5eb9f6ad4e), the change is relatively
> straightforward so I hope we can pick it into the next pretest.
>
> And sorry for introducing the leak in the first place :-(

It seems like this was already installed, so I'm closing this.




This bug report was last modified 1 year and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.