GNU bug report logs - #67977
30.0.50; tree-sitter: Emacs crashes when accessing treesit-nodes in a narrowed buffer

Previous Next

Package: emacs;

Reported by: Denis Zubarev <dvzubarev <at> yandex.ru>

Date: Fri, 22 Dec 2023 23:19:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 67977 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Denis Zubarev <dvzubarev <at> yandex.ru>, Yuan Fu <casouri <at> gmail.com>
Cc: 67977 <at> debbugs.gnu.org
Subject: Re: bug#67977: 30.0.50;
 tree-sitter: Emacs crashes when accessing treesit-nodes in a narrowed
 buffer
Date: Sat, 23 Dec 2023 09:26:28 +0200
> From: Denis Zubarev <dvzubarev <at> yandex.ru>
> Date: Sat, 23 Dec 2023 02:18:20 +0300
> 
> 1. emacs -Q
> 2. M-x find-file /tmp/t.py
> 3. paste there
> start=1
> def _init(self, param1, param2, param3=False):
>     self._param1 = param2
>     self._param2 = param2
>     self._param3 = param3
> 4. python-ts-mode
> 5. select two last lines and M-x narrow-to-region
> 6. answer all prompts
> 7. Put cursor on the last self
> 8. M-x eval-expression
> (progn
> (setq temp-node (treesit-node-at (point)))
> (sit-for 2)
> (garbage-collect)
> (message "node %s" temp-node))
> 9. Emacs crashes or prints node that contains garbage

Thanks.

Yuan, this also happens on the emacs-29 branch, so we should try
fixing this crash ASAP.




This bug report was last modified 1 year and 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.