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#71555: 29.3.50; Native-compilation sets some variable to nil unexpectedly. Date: Mon, 17 Jun 2024 03:25:09 -0400 Message-ID: References: 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="29731"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 71555@debbugs.gnu.org, eliz@gnu.org To: =?UTF-8?Q?S=C3=A9v=C3=A8re?= Durand Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 17 09:29:19 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 1sJ6nn-0007Ye-5p for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Jun 2024 09:29:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJ6nY-0004hH-67; Mon, 17 Jun 2024 03:29:04 -0400 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 1sJ6nV-0004gw-4W for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:29:01 -0400 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 1sJ6nU-00050K-M6 for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:29:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJ6nW-00013G-Fl for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 03:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jun 2024 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71555 X-GNU-PR-Package: emacs Original-Received: via spool by 71555-submit@debbugs.gnu.org id=B71555.17186092863973 (code B ref 71555); Mon, 17 Jun 2024 07:29:02 +0000 Original-Received: (at 71555) by debbugs.gnu.org; 17 Jun 2024 07:28:06 +0000 Original-Received: from localhost ([127.0.0.1]:59443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ6mb-000120-KE for submit@debbugs.gnu.org; Mon, 17 Jun 2024 03:28:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ6mZ-00011W-D5 for 71555@debbugs.gnu.org; Mon, 17 Jun 2024 03:28:03 -0400 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 1sJ6kM-0004eF-Eo; Mon, 17 Jun 2024 03:25:46 -0400 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=HBdexKn/fhFLPzgVuhLUaM5s0DAwgLgryK9SXS+SSpI=; b=DNPGs2Ur6Z8s+/jMUKor JQf9IESxL2sL3IqWYgrs8P3tep7+Ax4dwQYEVjeTpxmgs652zC2pMTNKTmbfUDU23pTO4iHGtV9eT TGKHLe7SfxjuEbgbS1ANUfIH8Eg/IPnVMEjmSB4fwLURARSWVdPCZBiCYgp+IlrJheJHWo7/uOxWw AGmLMlpyfllx0vQLxwZi0WnfkmB03MrWOBCXFkv0WOpQJ3pJN+UYEEQn21+k8o9d6sdviJ+bZngDB UOSKHbhxz1r9+LEaLslXFf9NuIv2U1kI9TAfRKaW1XQO4mvpSLGw0V5cj9lF4arEPwLVK6omU4w4U iFBpxWF95BRGYw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sJ6jl-0006Vm-CN; Mon, 17 Jun 2024 03:25:09 -0400 In-Reply-To: ("=?UTF-8?Q?S=C3=A9v=C3=A8re?= Durand"'s message of "Fri, 14 Jun 2024 22:55:56 +0800") 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:287363 Archived-At: S=C3=A9v=C3=A8re Durand 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=20 > minimal example would be. > > Hope this report is helpful. Hi S=C3=A9v=C3=A8re, 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