Subject: Re: bug#60237: 30.0.50; tree sitter core dumps when I edebug view a node

From: Yuan Fu <[email-masked]>
Date: Sat, 24 Dec 2022 01:20:19 -0800

Eli Zaretskii <[email-masked]> writes:

>> From: Mickey Petersen <[email-masked]>
>> Date: Wed, 21 Dec 2022 12:24:34 +0000
>
> Yuan, can you look into this?  The crash is in tree-sitter, so maybe
> it isn't our bug, but I'd like to be sure.  And even if it is a
> tree-sitter bug, maybe we can work around it to prevent Emacs from
> crashing?

Absolutely.

>> Happens in emacs -Q (after loading some simple elisp code that uses treesit.el) and consistently and repeatedly.
>> 
>> 
>> Here's the elisp. When I edebug it I can step and view all the
>> variables and expressions I like. The `combobulate-' functions are
>> widely used in the library and pose no issues anywhere else and do
>> nothing more than fetch nodes via tree sitter. It is only this bit of
>> code that blows up, and then only when invoked inside a python
>> string.

It would be nice if you can make a reproduce recipe. Judging from the
backtrace, you can probably trigger it by printing the node with print
or princ.  And does it trigger on all python strings? Or some specific
string in some specific python source?

Yuan