GNU bug report logs -
#74771
Native compilation bug with struct predicates when lexical binding enabled (HEAD)
Previous Next
Full log
Message #26 received at 74771 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 74771 <at> debbugs.gnu.org
>> From: Andrea Corallo <acorallo <at> gnu.org>
>> Date: Wed, 11 Dec 2024 17:29:34 -0500
>>
>> Eric Marsden <eric.marsden <at> risk-engineering.org> writes:
>>
>> > 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
>> >
>> > ;;; -*- 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)))
>>
>> Hi Eric,
>>
>> 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
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.