GNU bug report logs - #48368
eq? problem at -O2 since Guile 3.0.5

Previous Next

Package: guile;

Reported by: Marius Bakke <marius <at> gnu.org>

Date: Tue, 11 May 2021 20:50:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Marius Bakke <marius <at> gnu.org>
Subject: bug#48368: closed (thanks)
Date: Mon, 24 May 2021 12:20:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#48368: eq? problem at -O2 since Guile 3.0.5

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 48368 <at> debbugs.gnu.org.

-- 
48368: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48368
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> igalia.com>
To: 48368-done <at> debbugs.gnu.org
Subject: thanks
Date: Mon, 24 May 2021 14:19:22 +0200
Fixed in 17aab66e75136cf23c7f0d4942b61d6947f98f9b.  Thanks for the
report :)

[Message part 3 (message/rfc822, inline)]
From: Marius Bakke <marius <at> gnu.org>
To: bug-guile <at> gnu.org
Subject: eq? problem at -O2 since Guile 3.0.5
Date: Tue, 11 May 2021 22:49:19 +0200
[Message part 4 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.