unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Heitmann <sh@bytekomplex.de>
To: Yuan Fu <casouri@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: "70438@debbugs.gnu.org" <70438@debbugs.gnu.org>
Subject: bug#70438: AW: bug#70438: Emacs error 6 abort when starting rust-ts-mode
Date: Thu, 25 Apr 2024 11:24:13 +0000	[thread overview]
Message-ID: <AM0PR03MB5636093152BA24DAFCA9EF86AC172@AM0PR03MB5636.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <3FCA9A10-73AD-4B56-B3E7-AB3DF04FD2BF@gmail.com>

Thank you very much for your help...

I think I understand roughly the issue and it makes sense that you can't do anything here... But I think, I could file another bug report for the repo maintainer of the arch package 😉

Thanks again

Stefan

-----Ursprüngliche Nachricht-----
Von: Yuan Fu <casouri@gmail.com> 
Gesendet: 22 April 2024 08:14
An: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Heitmann <sh@bytekomplex.de>; 70438@debbugs.gnu.org
Betreff: Re: bug#70438: Emacs error 6 abort when starting rust-ts-mode



> On Apr 21, 2024, at 10:54 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sun, 21 Apr 2024 16:57:46 -0700
>> Cc: Stefan Heitmann <sh@bytekomplex.de>, 70438@debbugs.gnu.org
>> 
>>> But maybe I don't have a clear idea of what exactly was the 
>>> incompatible change.  Can you describe it here?  Is it the signature 
>>> of one or more tree-sitter functions, or is it something else?
>> 
>> From what I understand, they changed a struct in the public interface [1]. So now the ABI changed. But they didn’t change the ABI version, and Arch and Gentoo swiftly replaced the old libtree-sitter.so with the new libtree-sitter.so. Then the old Emacs loaded the new libtree-sitter.so (which has a new ABI) and crashed.
>> 
>> Our code is still perfectly compatible with the new tree-sitter code; the changed field in that struct doesn’t affect us. The incompatibility is at the binary level.
> 
> And that struct is declared on the tree-sitter include file?  If so, 
> the only thing we can do is reject the bad version of tree-sitter at 
> configure time, I think.  This assumes that when they change the ABI 
> version, they will also bump the version of the library, so the test 
> for the bad version will only discover the ones that have an 
> incompatible ABI.
> 
> Can you add such a test to configure.ac?
> 
> (We could theoretically also fail the compilation, using the #error 
> directive, but AFAICT the tree-sitter header files don't declare any 
> version-related symbols, so we cannot check the library version at 
> compile time.)

There’s really no “bad” version—if someone downloads Emacs source and the new version of tree-sitter library (0.22.5), and compiles Emacs with it, Emacs wouldn’t crash. Emacs only crashes when it’s built with the old tree-sitter header, and loads a new tree-sitter .so file (which has incompatible ABI but has the same ABI version). We obviously can’t do anything to the already built Emacs to make it compatible with the new libtree-sitter.so; and any newly-built Emacs will not have issues. So I don’t really know what can we do here.

Yuan

  parent reply	other threads:[~2024-04-25 11:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 11:41 bug#70438: Emacs error 6 abort when starting rust-ts-mode Stefan Heitmann
2024-04-17 16:27 ` Eli Zaretskii
2024-04-20  8:28   ` Yuan Fu
2024-04-20  9:36     ` Eli Zaretskii
2024-04-20 22:20       ` Yuan Fu
2024-04-21  4:47         ` Eli Zaretskii
2024-04-21 23:57           ` Yuan Fu
2024-04-22  5:54             ` Eli Zaretskii
2024-04-22  6:13               ` Yuan Fu
2024-04-22  6:53                 ` Eli Zaretskii
2024-04-25 11:24                 ` Stefan Heitmann [this message]
2024-04-25 13:19                   ` Eli Zaretskii
2024-04-26 16:49                     ` Yuan Fu
2024-04-26 17:21                       ` Eli Zaretskii
2024-04-26 17:58                         ` Yuan Fu
2024-04-26 18:32                           ` Eli Zaretskii
2024-04-27  3:06                             ` Yuan Fu
2024-04-27  6:16                               ` Eli Zaretskii

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=AM0PR03MB5636093152BA24DAFCA9EF86AC172@AM0PR03MB5636.eurprd03.prod.outlook.com \
    --to=sh@bytekomplex.de \
    --cc=70438@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    /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).