From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#70438: Emacs error 6 abort when starting rust-ts-mode Date: Sun, 21 Apr 2024 23:13:56 -0700 Message-ID: <3FCA9A10-73AD-4B56-B3E7-AB3DF04FD2BF@gmail.com> 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> <86cyqi6iyh.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20266"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70438@debbugs.gnu.org, Stefan Heitmann To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 22 08:15:05 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 1rymxE-00053p-4k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Apr 2024 08:15:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rymx0-000222-O7; Mon, 22 Apr 2024 02:14:50 -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 1rymwz-00021G-4p for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:14:49 -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 1rymwy-0001J5-T9 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:14:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rymxE-0001Xz-9O for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2024 02:15:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2024 06:15:04 +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.17137664745710 (code B ref 70438); Mon, 22 Apr 2024 06:15:04 +0000 Original-Received: (at 70438) by debbugs.gnu.org; 22 Apr 2024 06:14:34 +0000 Original-Received: from localhost ([127.0.0.1]:45519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rymwj-0001U2-Nk for submit@debbugs.gnu.org; Mon, 22 Apr 2024 02:14:34 -0400 Original-Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:53475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rymwg-0001T6-Eb for 70438@debbugs.gnu.org; Mon, 22 Apr 2024 02:14:32 -0400 Original-Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6f07de6ab93so3907652b3a.2 for <70438@debbugs.gnu.org>; Sun, 21 Apr 2024 23:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713766449; x=1714371249; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QDUrYWDW9EyKX/79qK/4WKWv4a1JMMZWlGE5zcIfo4I=; b=nqq8NjlK+Z0Zcbf8U8wHDquslHqKzFZ5uoTD+jNalNzbTlh9IW+yU3VvRNdtc0Gvqd rCr3YRM+brUbxUq6OtrVqFzUpmH9Wim5H3en+bhiFfj/nnGqfTxFp5NwzinyAm6NybVE vapepZLzmtSWON+iJEs2tzc949u11kcDzCUuLgMTEQNJQGy6YDqfo5ShuX931lrPBkVY xJ0TvNSI0jWH7/l37HQTaZetBHMdxYk1U39CPCK2v+odLwkOYM5RQkpBBWgij/FKfrCF XQU1XsCdoC/3ljOK1Xk1yUlB/yZqKjgrZ5i8qspixvHncoREEWtcTnjs9Zi9R/OlCAKa BlKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713766449; x=1714371249; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QDUrYWDW9EyKX/79qK/4WKWv4a1JMMZWlGE5zcIfo4I=; b=e1ZG7CgEqLHREwtr14VqzoozK1tNKdULqdDrywtYHlNGKGK5A2EPl1jtR2vGIGQVxK PobWmWZ+SoJ5IFYO7uegLKseGuIBG9VERrl/LQgFjZecG6Ds5xFbkVO5vrzzesTaA+ir rMFBIhddbm3MmZtv6sEOc9vJoIjeWkF2t/Xjy0lo3rFuaoXJv83M8wnAntr25UtRAfP6 FBE7E2rk/pyNk+3wgL/YwHL5QTauWjXn8YZAlR002Tz/VdKZtQDkB0ipwYrWB166lxE0 TgcJdZ3h2heSuo9wEgINB5FopNlmcm+VvVLFnED2ol4o/HFZBrGq/UWLmzQ7OTFfGfNe V1cQ== X-Forwarded-Encrypted: i=1; AJvYcCVRsOGL6ih2Pl0GeKM/2M+vwl5/peeq0o8wypgWmJoN47dNJm6zXLtt3xy83icVve5tgWjBvTGIVSTBByeEikNDOuQw1C0= X-Gm-Message-State: AOJu0YzigK/GIYf/yXDvQF903yufKS9L7r1nE29iJ/m8mYOAyiT6SIcI r3T9VXk48SouGRvDTygfmBEgUviBNhljr/HA8ir07iBgbQR0/bVB X-Google-Smtp-Source: AGHT+IETV4BUxKFyENkw6dNdfd8N3+sJcDXyV1KNMOxoWbm7YCXAqVKHKRt8ZjrSlaK1/hiOaejSRA== X-Received: by 2002:aa7:9a06:0:b0:6ec:fdcd:18eb with SMTP id w6-20020aa79a06000000b006ecfdcd18ebmr8579851pfj.21.1713766448500; Sun, 21 Apr 2024 23:14:08 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:641:300:4910:e4f6:f0b8:c91d:e40b]) by smtp.gmail.com with ESMTPSA id d11-20020a056a0010cb00b006e685994cdesm7034665pfu.63.2024.04.21.23.14.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2024 23:14:08 -0700 (PDT) In-Reply-To: <86cyqi6iyh.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6.1.1) 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:283803 Archived-At: > On Apr 21, 2024, at 10:54 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sun, 21 Apr 2024 16:57:46 -0700 >> Cc: Stefan Heitmann , >> 70438@debbugs.gnu.org >>=20 >>> 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? >>=20 >> =46rom what I understand, they changed a struct in the public = interface [1]. So now the ABI changed. But they didn=E2=80=99t 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. >>=20 >> Our code is still perfectly compatible with the new tree-sitter code; = the changed field in that struct doesn=E2=80=99t affect us. The = incompatibility is at the binary level. >=20 > 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. >=20 > Can you add such a test to configure.ac? >=20 > (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=E2=80=99s really no =E2=80=9Cbad=E2=80=9D version=E2=80=94if = someone downloads Emacs source and the new version of tree-sitter = library (0.22.5), and compiles Emacs with it, Emacs wouldn=E2=80=99t = crash. Emacs only crashes when it=E2=80=99s 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=E2=80=99t= 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=E2=80=99t really know what can we do here. Yuan=