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-done@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: Fri, 21 Jun 2024 09:04:41 +0300	[thread overview]
Message-ID: <864j9mn85i.fsf@gnu.org> (raw)
In-Reply-To: <87wmmjjrcu.fsf@disroot.org> (message from Mauritz Stenek on Thu,  20 Jun 2024 14:23:29 -0600)

> From: Mauritz Stenek <mstenek@disroot.org>
> Cc: 71679@debbugs.gnu.org
> Date: Thu, 20 Jun 2024 14:23:29 -0600
> 
> 
> > Actually, forget it.  I've succeeded in reproducing this here, 
> > and I
> > see that this problem was already fixed in the development 
> > sources.
> > The next Emacs release will have the bug fixed.
> 
> I'm curious to know, where can I see this fix? is there a 
> commit/patch?

I think it's these two:

  commit 00360258caddc0d8cf29ba3d9971125a06f8959b
  Author:     Yuan Fu <casouri@gmail.com>
  AuthorDate: Sat Jun 1 10:33:18 2024 -0700
  Commit:     Yuan Fu <casouri@gmail.com>
  CommitDate: Sat Jun 1 10:33:18 2024 -0700

      Fix treesit-parse-string crash (bug#71012)

      Parsing a large file with treesit-parse-string and then printing the
      returned node crashes Emacs, because with-temp-buffer kills the temp
      buffer when treesit-parse-string returns, and print.c tries to access
      the node's position in the killed buffer.

      * lisp/treesit.el (treesit-parse-string): Don't use with-temp-buffer.

  commit 20af58d3a13ddb5c2ca376da8cdd3fde4833ca2d
  Author:     Yuan Fu <casouri@gmail.com>
  AuthorDate: Sat Jun 1 10:20:48 2024 -0700
  Commit:     Yuan Fu <casouri@gmail.com>
  CommitDate: Sat Jun 1 10:29:55 2024 -0700

      Check for buffer liveness when accessing tree-sitter node (bug#71012)

      * src/treesit.h (treesit_node_buffer_live_p): Declare function.
      * src/print.c (print_vectorlike): Print node without position if
      buffer is killed.
      * src/treesit.c (treesit_node_buffer_live_p): New function.
      (treesit_check_node): Add buffer liveness check.
      (syms_of_treesit): New error treesit-node-buffer-killed.

> Also, is there a schedule for the next release?

Answered that already in my other mail.

And with that, I'm closing this bug.





  reply	other threads:[~2024-06-21  6:04 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
     [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 [this message]
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=864j9mn85i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71679-done@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).