* bug#48368: eq? problem at -O2 since Guile 3.0.5
@ 2021-05-11 20:49 Marius Bakke
2021-05-24 8:14 ` bug#48368: reduced test case Andy Wingo
2021-05-24 12:19 ` bug#48368: thanks Andy Wingo
0 siblings, 2 replies; 3+ messages in thread
From: Marius Bakke @ 2021-05-11 20:49 UTC (permalink / raw)
To: 48368
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-24 12:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 20:49 bug#48368: eq? problem at -O2 since Guile 3.0.5 Marius Bakke
2021-05-24 8:14 ` bug#48368: reduced test case Andy Wingo
2021-05-24 12:19 ` bug#48368: thanks Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).