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 #52 received at 71679-done <at> debbugs.gnu.org (full text, mbox):
> From: Mauritz Stenek <mstenek <at> disroot.org>
> Cc: 71679 <at> 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 <at> gmail.com>
AuthorDate: Sat Jun 1 10:33:18 2024 -0700
Commit: Yuan Fu <casouri <at> 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 <at> gmail.com>
AuthorDate: Sat Jun 1 10:20:48 2024 -0700
Commit: Yuan Fu <casouri <at> 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.
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.