GNU bug report logs - #74771
Native compilation bug with struct predicates when lexical binding enabled (HEAD)

Previous Next

Package: emacs;

Reported by: Eric Marsden <eric.marsden <at> risk-engineering.org>

Date: Tue, 10 Dec 2024 16:57:02 UTC

Severity: normal

Done: Andrea Corallo <acorallo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Subject: bug#74771: closed (Re: bug#74771: Native compilation bug with
 struct predicates when lexical binding enabled (HEAD))
Date: Mon, 24 Mar 2025 20:28:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#74771: Native compilation bug with struct predicates when lexical binding enabled (HEAD)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 74771 <at> debbugs.gnu.org.

-- 
74771: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74771
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andrea Corallo <acorallo <at> gnu.org>
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Cc: 74771-done <at> debbugs.gnu.org
Subject: Re: bug#74771: Native compilation bug with struct predicates when
 lexical binding enabled (HEAD)
Date: Mon, 24 Mar 2025 16:26:57 -0400
Eric Marsden <eric.marsden <at> risk-engineering.org> writes:

> On 23/03/2025 17:37, Andrea Corallo wrote:
>> Eric Marsden <eric.marsden <at> risk-engineering.org> writes:
>>
>>> 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 present.
>>>
>>> % /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-59c4b27c-c70072f9.eln (native compiled elisp)...
>>> Running in GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2)
>>>   of 2024-12-09
>>> is? nil
>>> is? t   ;; expecting nil
>>> bar: 111
>> Hi Eric,
>>
>> could you try with d565a6747a2, seems to work for me.  I'll want to do
>> more work in this area anyway this fixes the issue now.
>
> Hello,
>
> I tested with current HEAD (0cfe700e336) which resolves the problem, also on my full application. Thanks!
>
> Eric

Cool, closing then.

Thanks for the good report and sorry for the wait.

  Andrea

[Message part 3 (message/rfc822, inline)]
From: Eric Marsden <eric.marsden <at> risk-engineering.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Native compilation bug with struct predicates when lexical binding
 enabled (HEAD)
Date: Tue, 10 Dec 2024 17:55:46 +0100
[Message part 4 (text/plain, inline)]
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 present.

% /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-59c4b27c-c70072f9.eln (native compiled elisp)...
Running in GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2)
 of 2024-12-09
is? nil
is? t   ;; expecting nil
bar: 111

[bug.el (text/x-emacs-lisp, attachment)]

This bug report was last modified 60 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.