GNU bug report logs -
#71679
29.3; treesit-node-child function chokes and crashes emacs for nodes with large number of child nodes
Previous Next
Reported by: Mauritz Stenek <mstenek <at> disroot.org>
Date: Thu, 20 Jun 2024 15:09:01 UTC
Severity: normal
Found in version 29.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 71679 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 20 Jun 2024 09:08:31 -0600
> From: Mauritz Stenek via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
>
> The function `treesit-node-child` chokes when parsing a
> tree-sitter node with a large number of child nodes -- ie a large
> buffer string -- and causes emacs to crash.
>
> To reproduce, load a large source file, and run this:
>
> ```
> (let ((string (with-current-buffer
> "<buffer name with a large number or lines>"
> (buffer-string)))
> (node (treesit-parse-string string <LANGUAGE>)))
> (treesit-node-child node 0 t))
> ```
> (this assumes that the LANGUAGE-ts-mode and the LANGUAGE grammar
> are installed).
>
> This crashed my emacs; here's the backtrace:
Thanks, but please tell exactly which grammar you used and post a
"file with a large number of lines" that can be used to reproduce
this.
The backtrace you posted can only be interpreted on your system, so it
is important to have a reproduction recipe for us to look into the
problem.
This bug report was last modified 1 year and 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.