GNU bug report logs - #59426
29.0.50; [tree-sitter] Some functions exceed maximum recursion limit

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Mon, 21 Nov 2022 00:54:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: luangruo <at> yahoo.com, mattiase <at> acm.org, stefankangas <at> gmail.com,
 59426 <at> debbugs.gnu.org
Subject: Re: bug#59426: 29.0.50; [tree-sitter] Some functions exceed maximum
 recursion limit
Date: Thu, 24 Nov 2022 21:28:16 +0200
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Thu, 24 Nov 2022 11:25:58 -0800
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  Po Lu <luangruo <at> yahoo.com>,
>  Stefan Kangas <stefankangas <at> gmail.com>,
>  59426 <at> debbugs.gnu.org
> 
> That brings us back to the original question: what limit should we use? I suggest we use a smaller number since normal tree should never be very tall. Running the following code tells me the height of the tree for xdisp.c is 30:
> 
> (defun measure-height (node)
>   (let ((children (treesit-node-children node t)))
>     (if children
>         (1+ (apply #'max (mapcar #'measure-height children)))
>       1)))
> ;; In xdisp.c:
> (measure-height (treesit-buffer-root-node))
> 
> Maybe a limit in the range of hundreds or thousands? 800?

I suggest 1000.




This bug report was last modified 2 years and 174 days ago.

Previous Next


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