From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marius Bakke Newsgroups: gmane.lisp.guile.bugs Subject: bug#48368: eq? problem at -O2 since Guile 3.0.5 Date: Tue, 11 May 2021 22:49:19 +0200 Message-ID: <87pmxxhu7k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27725"; mail-complaints-to="usenet@ciao.gmane.io" To: 48368@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Tue May 11 22:50:07 2021 Return-path: Envelope-to: guile-bugs@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 1lgZKR-00072T-8D for guile-bugs@m.gmane-mx.org; Tue, 11 May 2021 22:50:07 +0200 Original-Received: from localhost ([::1]:57918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgZKQ-00089j-7o for guile-bugs@m.gmane-mx.org; Tue, 11 May 2021 16:50:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZKM-00088R-Cs for bug-guile@gnu.org; Tue, 11 May 2021 16:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgZKM-0001Yd-4p for bug-guile@gnu.org; Tue, 11 May 2021 16:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgZKM-0003gw-0t for bug-guile@gnu.org; Tue, 11 May 2021 16:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 11 May 2021 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48368 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162076616614140 (code B ref -1); Tue, 11 May 2021 20:50:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 May 2021 20:49:26 +0000 Original-Received: from localhost ([127.0.0.1]:37622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZJm-0003g0-0R for submit@debbugs.gnu.org; Tue, 11 May 2021 16:49:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZJj-0003fs-NW for submit@debbugs.gnu.org; Tue, 11 May 2021 16:49:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZJj-0007EP-Ey for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37802) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgZJj-0001CN-81 for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 Original-Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:50618 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZJi-0003Mv-II for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10045 Archived-At: --=-=-= Content-Type: text/plain Hi! I haven't been able to make a reproducer for this, but for illustrative purposes, here is a code snippet that fails with -O2 on Guile 3.0.5 and later (excerpt from GNU Shepherd): (define (run-command socket-file action service args) "Perform ACTION with ARGS on SERVICE, and display the result. Connect to the daemon via SOCKET-FILE." (with-system-error-handling (let ((sock (open-connection socket-file)) (action* (if (and (eq? action 'detailed-status) (memq service '(root shepherd))) 'status action))) ;; Send the command. (write-command (shepherd-command action* service #:arguments args) sock) https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/scripts/herd.scm#n124 At -O2, (eq? action 'detailed-status) evaluates to true no matter what symbol ACTION holds. Interestingly, adding (pk action*) between LET and WRITE-COMMAND gives the expected result and mitigates the problem(!). There are other issues that can be observed by running the Shepherd test suite (i.e. make -j4 check). With -O1 all pass. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYJrtzw8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHe4hQEAknNS0PVUkTkz0Wy3x/S3Qu50FowvKcMDxmKx nsISOG8BALKLfG7ywwYVOnuC73czgpEaLT3EMzjBdGHnh7Tu6wEO =4y51 -----END PGP SIGNATURE----- --=-=-=--