From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#74771: Native compilation bug with struct predicates when lexical binding enabled (HEAD) Date: Sun, 29 Dec 2024 04:44:55 -0500 Message-ID: References: <0446a656-1fa2-4160-a8ba-69c060a52589@risk-engineering.org> <865xn4ul9t.fsf@gnu.org> Mime-Version: 1.0 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="38602"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74771@debbugs.gnu.org, eric.marsden@risk-engineering.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 29 10:46:39 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 1tRpsc-0009w7-Fb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Dec 2024 10:46:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRpsD-0005fa-JE; Sun, 29 Dec 2024 04:46:13 -0500 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 1tRps4-0005f9-7O for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 04:46:09 -0500 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 1tRps2-0004Ic-Au for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 04:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=MmKr2wWBrBrLSpB9qrgyLRVj1LS4qraFC0sSqBgcOeo=; b=lyN/DGKlyc84fXUVV7Slv9fp87wRhJHZnLg9LEwsEJ58B6mBVbhVCJsFVcl1PQtIT01g8iWMbPwnhSm5n2nTtsAX5jLF0AOXytJvzpwB8jrjH++IIIvxqQdW5Q2s64HgWX7G4TZPs+YWZMC9n0us+8piMUwwmg+d0Hq/XKUbdGoOvr7qcnHN7gSkuS+d+lTAdNgmXwCMzWCwbxlCErAxTqIQVYf0Sf5DxaoUubAeYiiwQtI88+7W0nCKz+xwQr5DzvnMrEzeupLj3hVeM7xVXK9l+9CIuc1bqf4tTACBmxEX0or2WV/nU8WjzFU8u5RDWhlobJV5unwXuhgai28fdw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRps2-0005xI-1q for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 04:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2024 09:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74771 X-GNU-PR-Package: emacs Original-Received: via spool by 74771-submit@debbugs.gnu.org id=B74771.173546550322462 (code B ref 74771); Sun, 29 Dec 2024 09:46:02 +0000 Original-Received: (at 74771) by debbugs.gnu.org; 29 Dec 2024 09:45:03 +0000 Original-Received: from localhost ([127.0.0.1]:53771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRpr5-0005qC-57 for submit@debbugs.gnu.org; Sun, 29 Dec 2024 04:45:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRpr3-0005pO-87 for 74771@debbugs.gnu.org; Sun, 29 Dec 2024 04:45:01 -0500 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 1tRpqx-00043f-TA; Sun, 29 Dec 2024 04:44:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=MmKr2wWBrBrLSpB9qrgyLRVj1LS4qraFC0sSqBgcOeo=; b=aYF8eNnE8Cv7e9lAL9cP bzNP4frkj19S+N05leUl/OAYabeMWV5ShdW2I2hiKI3d/qkdR6Sv2lgYq/wQkmcxNh4itpkJWIoc8 i7EsB/0HVTS30AxdCFz82L4+oZC2ncoei9gahPt6rRlp33bZj+JkzHyUvpOFgpCAXp7Ewu8AlSRQ3 9Uya032ZK4fB2hjlJymah7XP8KasILafLJfJ0jJ57adQR6ljvdIx0MKC8RT1FZL5o06JBgx1wJKl3 NhX4AeMSoGyFNVqHHV0gKdxaptt5+Ms9dobPmQvVhjrne3LCMdhZTNs1ksa+E15EFGxeL3oo9quvH EFNrXL/YYjX3Xg==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tRpqx-0005YS-70; Sun, 29 Dec 2024 04:44:55 -0500 In-Reply-To: <865xn4ul9t.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Dec 2024 12:58:22 +0200") 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:297939 Archived-At: Eli Zaretskii writes: >> Cc: 74771@debbugs.gnu.org >> From: Andrea Corallo >> Date: Wed, 11 Dec 2024 17:29:34 -0500 >>=20 >> Eric Marsden writes: >>=20 >> > Hi, >> > >> > With the attached source file, Emacs miscompiles the struct predicate = such >> > that a repeated call to the predicate on a non-struct object returns t. >> > This occurs with current HEAD on Linux/AMD64, but not on the Emacs 30.= 0.92 >> > pretest. It does not occur when the lexical binding cookie is not pres= ent. >> > >> > % /opt/emacs/bin/emacs -Q --batch --eval "(load (native-compile \"/tmp= /bug.el\"))" -f run >> > Loading /home/emarsden/.emacs.d/eln-cache/31.0.50-c021c983/bug-59c4b27= c-c70072f9.eln (native compiled elisp)... >> > Running in GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Versi= on 3.24.43, cairo version 1.18.2) >> > =C2=A0of 2024-12-09 >> > is? nil >> > is? t=C2=A0=C2=A0 ;; expecting nil >> > bar: 111 >> > >> > ;;; -*- lexical-binding: t -*- >> > ;; >> > ;; /opt/emacs/bin/emacs -Q --batch -L . --eval "(load (native-compile = \"/tmp/bug.el\"))" -f run >> > >> > (require 'cl-lib) >> > >> > (cl-defstruct foobles bar baz) >> > >> > (defun bug (foo) >> > (message "is? %s" (foobles-p foo)) >> > (message "is? %s" (foobles-p foo)) >> > (message "bar: %s" (foobles-bar foo))) >> > >> > (defun run () >> > (message "Running in %s" (version)) >> > (let ((foo "foo")) >> > (bug foo))) >>=20 >> Hi Eric, >>=20 >> thanks for the report, I'll look at this in the coming days. > > Any progress here? Not so far, I'm on holiday this days so I don't have much time for coding, it's in my todo list tho. Andrea