all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: "Sévère Durand" <mmemmew@gmail.com>
Cc: 71555@debbugs.gnu.org, eliz@gnu.org
Subject: bug#71555: 29.3.50; Native-compilation sets some variable to nil unexpectedly.
Date: Mon, 17 Jun 2024 03:25:09 -0400	[thread overview]
Message-ID: <yp14j9sjaju.fsf@fencepost.gnu.org> (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.

Hi Sévère,

I can't reproduce on master so the bug there is fixed.

AFAIK we don't plan to release a new 29 so I'm not sure it's worth the
effort of investigating and producing a backport for this bug.

Eli WDYT?

Thanks

  Andrea





  parent reply	other threads:[~2024-06-17  7:25 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
2024-06-17  7:25 ` Andrea Corallo [this message]
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=yp14j9sjaju.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=71555@debbugs.gnu.org \
    --cc=eliz@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.