GNU bug report logs -
#48368
eq? problem at -O2 since Guile 3.0.5
Previous Next
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
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.