On 18.06.2022 02:28, Yuan Fu wrote:

I’ve figure out the problem. It is due to my misunderstanding of how gc works. I’ve pushed a fix.

On a separate note, I also pushed the change that makes treesit-parser-list a function (rather than a variable).

Yuan

Just FYI: Getting latest sources and compiling from scratch, I get the following build warning:
In treesit-traverse-forward:
treesit.el:291:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
Besides that, I've tested your changes and they definitely fix the segfault. Great stuff!

--
Vennlig hilsen
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjønigsen.no