From: Yuan Fu <casouri@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Noah Peart <noah.v.peart@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
john muhl <jm@pub.pink>,
72238-done@debbugs.gnu.org
Subject: bug#72238: 31.0.50; Segfault after treesit_delete_query
Date: Tue, 1 Oct 2024 22:37:42 -0700 [thread overview]
Message-ID: <C76DDBED-AC4E-4B69-A5C5-3A8DB5F286B1@gmail.com> (raw)
In-Reply-To: <CADwFkm=KAJdynu=UAL_zheLVEa2NJyLcF0Ud6CPgdNfAD70YNQ@mail.gmail.com>
> On Sep 29, 2024, at 6:42 PM, Stefan Kangas <stefankangas@gmail.com> wrote:
>
> Yuan Fu <casouri@gmail.com> writes:
>
>>> On Jul 22, 2024, at 4:17 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>>
>>>> Cc: Noah Peart <noah.v.peart@gmail.com>, 72238@debbugs.gnu.org
>>>> From: Yuan Fu <casouri@gmail.com>
>>>> Date: Sun, 21 Jul 2024 17:01:31 -0700
>>>>
>>>>
>>>>
>>>>> On Jul 21, 2024, at 3:24 PM, john muhl <jm@pub.pink> wrote:
>>>>>
>>>>> Noah Peart <noah.v.peart@gmail.com> writes:
>>>>>
>>>>>> After recent build, emacs is crashing frequently when using tree-sitter
>>>>>> modes.
>>>>>>
>>>>>> The following backtrace was generated after opening a few C files,
>>>>>> enabling c-ts-mode, and moving the cursor around a bit. I dont have
>>>>>> precise steps for repeatability at this point (sorry!), as it seems to
>>>>>> occur during garbage collection.
>>>>>>
>>>>>> Let me know if there is more useful output I could provide.
>>>>>
>>>>> Could you try reverting 1abf3bdd7ed and see if that helps?
>>>>
>>>> Hey guys, sorry for the segfault. It’s indeed caused by 1abf3bdd7ed, I just fixed it on master.
>>>
>>> Thanks, but I'm confused, since I see a fix both on emacs-30 and on
>>> master. What exactly did you fix and on which branch(es)? Did the
>>> problem exist on emacs-30 (it was reported for master)?
>>
>> Yeah, there’re two bugs: 1) we shouldn’t delete the query object without
>> checking for NULL, and 2) we shouldn’t delete the cursor object without checking
>> for NULL. In emacs-30, only query could be NULL, cursor is always initialized;
>> in emacs-master, due to my recent change, both query and cursor could be NULL.
>>
>> So I added checks for both query and cursor in one commit and pushed to master, and cherry-picked the commit to emacs-30.
>>
>> Yuan
>
> Should this bug be closed then?
Yes, sorry. Closing.
Yuan
prev parent reply other threads:[~2024-10-02 5:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-21 21:44 bug#72238: 31.0.50; Segfault after treesit_delete_query Noah Peart
2024-07-21 22:24 ` john muhl
2024-07-22 0:01 ` Yuan Fu
2024-07-22 1:38 ` Noah Peart
2024-07-22 11:17 ` Eli Zaretskii
2024-07-23 11:02 ` Eli Zaretskii
2024-07-23 16:44 ` Yuan Fu
2024-09-30 1:42 ` Stefan Kangas
2024-10-02 5:37 ` Yuan Fu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C76DDBED-AC4E-4B69-A5C5-3A8DB5F286B1@gmail.com \
--to=casouri@gmail.com \
--cc=72238-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jm@pub.pink \
--cc=noah.v.peart@gmail.com \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).