Subject: bug#72863: 30.0.50; tree-sitter elixir-ts-mode hangs and memory leak on some elixir and heex code

From: Eli Zaretskii <[email-masked]>
Date: Thu, 29 Aug 2024 08:09:25 +0300

> From: [email-masked]
> Date: Thu, 29 Aug 2024 06:57:38 +0400
> 
> Code in attached file cause Emacs to hang and memory leak infinitely
> while editing. Try to open this code in elixir-ts-mode and move cursor
> on line 6 (between <:loading>  </:loading>) and type char by char:
> 
> <.some_component a={
> 
> (for some reason it does not happen with electric-pair-mode when {}
> inserted automatically).
> 
> I am able to reproduce this with -Q on few different machines (Linux and
> MacOS) and Emacs 29, 30.0.5 and current HEAD.
> 
> C-g does nothing (including with debug-on-quit and sending SIGUSR2)
> 
> At the same time I can't reproduce this in other tree-sitter based editors.
> 
> I got this sample code sample from elixir-ts-mode repo but now it's moved
> to the Emacs core so seems to be out of scope of Github repo issues.
> 
> Attaching samle code and LLDB backtrace. 
> Also attaching report from built-in MacOS crash reporting tool just in case.

Thanks.

Wilhelm and Yuan, could you please look into this soon?