From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: "Sévère Durand" <mmemmew@gmail.com>
Cc: 71555@debbugs.gnu.org, Andrea Corallo <acorallo@gnu.org>
Subject: bug#71555: 29.3.50; Native-compilation sets some variable to nil unexpectedly.
Date: Sun, 16 Jun 2024 14:46:07 +0200 [thread overview]
Message-ID: <m2a5jl9htc.fsf@Pro.fritz.box> (raw)
In-Reply-To: <CAHg+Y3TVe0Ep7B_iDvc4ZgGhS+g8g7h_Vwm9i2Zjj_qzHfv0vA@mail.gmail.com> ("Sévère Durand"'s message of "Fri, 14 Jun 2024 22:55:56 +0800")
Sévère Durand <mmemmew@gmail.com> writes:
> Hello:
>
> I recently found that sometimes an argument of a function is
> unexpectedly set to nil when the function is natively compiled.
>
> A recipe to reproduce the behaviour is as follows.
>
> ```elisp
> (defun test (&optional start)
> "Test the values of START."
> (message "start is %S" start)
> (cond
> ((not (integer-or-marker-p start))
> (message "entered first cond variant")
> (setq start nil))
> ((and
> (markerp start)
> (not (equal (marker-buffer start) (current-buffer))))
> (message "entered second cond variant")
> (setq start nil)))
> (message "start is %S" start))
> (native-compile 'test)
> (test 12)
> ```
>
> When I evaluate the above forms in sequence, I got the following two
> messages:
>
> start is 12
> start is nil
>
> As can be seen from the above, no `cond` variants are triggered, so the
> variable START should have the value 12, while it becomes nil at the
> end.
>
> Sorry if this example is not minimal: I found this behaviour in my
> package, so copied the relevant parts here. I am not sure what a
> minimal example would be.
>
> Hope this report is helpful.
> ---
> In GNU Emacs 29.3.50 (build 1, x86_64-apple-darwin23.4.0, NS
> appkit-2487.50 Version 14.4.1 (Build 23E224)) of 2024-06-12 built on
> MacBook-Pro-de-Severe.local
I can reproduce this on macOS 14.5 x86-64 on the emacs-29 branch but not
on master. Maybe Andrea (CC'd) can help.
next prev parent reply other threads:[~2024-06-16 12:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 14:55 bug#71555: 29.3.50; Native-compilation sets some variable to nil unexpectedly Sévère Durand
2024-06-16 12:46 ` Gerd Möllmann [this message]
2024-06-17 7:25 ` Andrea Corallo
2024-06-17 7:32 ` Sévère Durand
2024-06-17 8:00 ` Andrea Corallo
2024-06-17 14:02 ` Sévère Durand
2024-06-17 14:38 ` Andrea Corallo
2024-06-17 14:41 ` Andrea Corallo
2024-06-17 12:00 ` Eli Zaretskii
2024-06-17 13:15 ` Andrea Corallo
2024-06-17 10:08 ` Mattias Engdegård
2024-06-17 10:15 ` Andrea Corallo
2024-06-17 10:58 ` Mattias Engdegård
2024-06-17 12:04 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2a5jl9htc.fsf@Pro.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=71555@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=mmemmew@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.