Subject: bug#70059: 30.0.50; c-ts-mode crashes emacs

From: Eli Zaretskii <[email-masked]>
Date: Tue, 02 Apr 2024 21:34:06 +0300

> From: Yuan Fu <[email-masked]>
> Date: Tue, 2 Apr 2024 11:22:44 -0700
> Cc: Eli Zaretskii <[email-masked]>,
>  [email-masked]
> 
> > But as i wrote, it doesn't crash with tree-sitter from the official arch
> > linux repos, and because i program in C every day, i switched to the
> > stable tree-sitter and had no problems since.
> > 
> > That's why i asked if a faulty tree-sitter should be able to crash
> > emacs. If that is acceptable, this bug report can be closed.
> 
> I mean tree-sitter (the library) runs in the main thread, if it triggers a segfault, AFAIK Emacs currently can’t really do anything. Is that right Eli?

You are right.  But these crashes seem to be inside GC, which
processes our objects, so if tree-sitter somehow causes us to create
invalid Lisp objects, it's our fault, at least to some extent.