Subject: Re: bug#72612: (set! display #f) infinite loop

From: <[email-masked]>
Date: Wed, 14 Aug 2024 06:36:48 +0200

On Tue, Aug 13, 2024 at 07:06:09PM -0400, Bryce Moore wrote:
> I know it's nonsensical, but (set! display #f) in a fresh interpreter
> causes an infinite loop.
> 
> Interrupting with Ctrl+C exits guile.
> 
> scheme@(guile-user)> (set! display #f)
> While reading expression:
> Wrong type to apply: Error while printing exception.
> While reading expression:
> Wrong type to apply: Error while printing exception.
> While reading expression:
> Wrong type to apply: Error while printing exception.
> While reading expression:
> Wrong type to apply: Error while printing exception.
> [...]

I haven't currently a working Guile around to check (bad me, will
fix that!) but my guess is that Guile is trying to complain (via
an uncaught exception) that you're trying to mutate something you
should not and... is calling display for that. Which now is #f,
which is definitely a wrong type to apply.

Cheers
-- 
t