unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mauritz Stenek <mstenek@disroot.org>
Cc: 71679@debbugs.gnu.org
Subject: bug#71679: 29.3; treesit-node-child function chokes and crashes emacs for nodes with large number of child nodes
Date: Thu, 20 Jun 2024 19:02:41 +0300	[thread overview]
Message-ID: <86zfrfmwke.fsf@gnu.org> (raw)
In-Reply-To: <87bk3vmz2o.fsf@disroot.org> (bug-gnu-emacs@gnu.org)

> 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@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.





  reply	other threads:[~2024-06-20 16:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 15:08 bug#71679: 29.3; treesit-node-child function chokes and crashes emacs for nodes with large number of child nodes Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 16:02 ` Eli Zaretskii [this message]
     [not found]   ` <877cejmv0m.fsf@disroot.org>
2024-06-20 16:50     ` Eli Zaretskii
2024-06-20 17:07       ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 18:06         ` Eli Zaretskii
2024-06-20 18:24           ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 18:35             ` Eli Zaretskii
2024-06-20 19:05               ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 19:10                 ` Eli Zaretskii
2024-06-20 19:22                   ` Eli Zaretskii
2024-06-20 19:46                     ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21  5:55                       ` Eli Zaretskii
2024-06-20 20:23                     ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21  6:04                       ` Eli Zaretskii
2024-06-20 19:31                   ` Mauritz Stenek via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-20 19:43                     ` Eli Zaretskii

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=86zfrfmwke.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71679@debbugs.gnu.org \
    --cc=mstenek@disroot.org \
    /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).