From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70438: Emacs error 6 abort when starting rust-ts-mode Date: Mon, 22 Apr 2024 08:54:14 +0300 Message-ID: <86cyqi6iyh.fsf@gnu.org> References: <868r1cgdk9.fsf@gnu.org> <0439FD61-C3EE-4438-B775-043FE098F41E@gmail.com> <86zfto8jfs.fsf@gnu.org> <86jzkr8gpr.fsf@gnu.org> <6944FFA3-5CEB-4FFA-9A4C-1EFFF8EDC62D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70438@debbugs.gnu.org, sh@bytekomplex.de To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 22 07:55:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rymdw-000AUy-Vm for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Apr 2024 07:55:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rymdd-00078I-9p; Mon, 22 Apr 2024 01:54:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rymdc-000787-3K for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 01:54:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rymdb-0006AB-R7 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 01:54:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rymdr-0007eh-I8 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 01:55:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2024 05:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70438 X-GNU-PR-Package: emacs Original-Received: via spool by 70438-submit@debbugs.gnu.org id=B70438.171376528529231 (code B ref 70438); Mon, 22 Apr 2024 05:55:03 +0000 Original-Received: (at 70438) by debbugs.gnu.org; 22 Apr 2024 05:54:45 +0000 Original-Received: from localhost ([127.0.0.1]:45504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rymdY-0007bE-2L for submit@debbugs.gnu.org; Mon, 22 Apr 2024 01:54:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rymdS-0007Zu-Pl for 70438@debbugs.gnu.org; Mon, 22 Apr 2024 01:54:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rymd6-00067O-5J; Mon, 22 Apr 2024 01:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=H+q4B5ALbxJdcUOpLW23SUWmJMumCRmtJ4JEN5oUeas=; b=EO8xCPFs08uDqtO+BWFe IhE/zugiMa+0hSdsdxGbDjAZIMZBRt/vJNr/4tDG4Cv5QdOYqkIFphyK+MHuxtyd6gk2CJf/4Ywma fnQKtpWpGqf8GIOojvls/cc76EB9fB95lpcGpbF8xajoc7N7+Tq/ur+uVEH1Mb0r8f3hNF6cVAQEf kI+k9oZ+CsK7ZuEkLyXGb3gQALJ1fmpYa0/EQO81ASd6mabXm4Xd/5skopLu5bbZnS9xOxsqUWkh+ rb76KCcOufIQltQt/3yFQCiP8PqbTHdd7wpf+XB0j1Z4SeiG8LaYt9mcVcjewtJ/pnFnM1LYcx3lD ycAeQc3SgM4kNg==; In-Reply-To: <6944FFA3-5CEB-4FFA-9A4C-1EFFF8EDC62D@gmail.com> (message from Yuan Fu on Sun, 21 Apr 2024 16:57:46 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283800 Archived-At: > From: Yuan Fu > Date: Sun, 21 Apr 2024 16:57:46 -0700 > Cc: Stefan Heitmann , > 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.)