From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#48061: Unexpected result from a native-compiled function Date: Wed, 28 Apr 2021 09:19:09 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40230"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48061-done@debbugs.gnu.org, acm@muc.de To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 28 11:20:11 2021 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 1lbgMc-000ALB-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 11:20:10 +0200 Original-Received: from localhost ([::1]:42254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbgMb-0005Tc-2C for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 05:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbgMU-0005TP-UG for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 05:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbgMU-0003mW-L6 for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 05:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbgMU-0003Wl-Ec for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 05:20:02 -0400 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Apr 2021 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48061 X-GNU-PR-Package: emacs Mail-Followup-To: 48061@debbugs.gnu.org, acm@muc.de, acm@muc.de Original-Received: via spool by 48061-done@debbugs.gnu.org id=D48061.161960155813487 (code D ref 48061); Wed, 28 Apr 2021 09:20:02 +0000 Original-Received: (at 48061-done) by debbugs.gnu.org; 28 Apr 2021 09:19:18 +0000 Original-Received: from localhost ([127.0.0.1]:51715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbgLm-0003VT-CE for submit@debbugs.gnu.org; Wed, 28 Apr 2021 05:19:18 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:48588 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lbgLk-0003VD-NE for 48061-done@debbugs.gnu.org; Wed, 28 Apr 2021 05:19:17 -0400 Original-Received: (qmail 86684 invoked by uid 3782); 28 Apr 2021 09:19:09 -0000 Original-Received: from acm.muc.de (p4fe15c50.dip0.t-ipconnect.de [79.225.92.80]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Apr 2021 11:19:09 +0200 Original-Received: (qmail 5286 invoked by uid 1000); 28 Apr 2021 09:19:09 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.io gmane.emacs.bugs:205085 Archived-At: Hello, Andrea. On Tue, Apr 27, 2021 at 21:03:05 +0000, Andrea Corallo wrote: > Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: [ .... ] > >> After the indicated line (0x26595), when 0x0 (nil) is in rax (i.e. the > >> `eq' function has returned nil) the result of the function should be > >> here-BOM, i.e. r13. There is no instruction > >> mov %r13,%rax > >> to effect this return. Instead, rax is still holding nil, and this is > >> falsely returned. > > Hi Alan, > > thanks for investigating this! I had a quick look and I think I see > > what's the issue, I'll follow up when I've the fix. > Hi Alan, > looking at the intermediate representation of this interesting function > I've fixed a bug, I can't prove it solves your issue as I've no > reproducer tho. > Could you try if as of 4e1e0b9dec this is solved? If is not the case > could you provide a reproducer so I'll not disturb next time until is > solved :) The bug fix does indeed fix my problem. :-) My test case now runs to the end without error, and I had a look at the disassembly too, in which I no longer see the problem from yesterday. I'm closing the bug with this post. Thanks! > Thanks > Andrea -- Alan Mackenzie (Nuremberg, Germany).