Subject: Re: bug#39865: 28.0.50; Emacs crash

From: Eli Zaretskii <[email-masked]>
Date: Wed, 11 Mar 2020 18:58:41 +0200

> From: Robert Pluim <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Tue, 10 Mar 2020 16:15:09 +0100
> 
> +          if (EQ (prop, Qfont_backend))
> +            {
> +              Lisp_Object tail = val;
> +              Lisp_Object backend;
> +              FOR_EACH_TAIL_SAFE (tail)
> +                {
> +                  backend = XCAR (tail);
> +                  if (! c_symbol_p (XSYMBOL (backend)))
> +                    {
> +                      AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
> +                      xsignal1 (Quser_error, CALLN (Fformat, format, backend));
> +                    }
> +                }
> +            }
> +

This will pass any symbol, it doesn't really verify that the symbol
identifies a font backend, does it?  Why not loop over
font_driver_list instead?  Or do we need to support here font backends
that were not yet registered?

> Setting font-backend to a supported value with default-frame-alist
> in .emacs should work, and does for me in master, at least switching
> from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
> 
> Hmm, switching to 'x' also crashes.

And the above patch doesn't fix those crashes, does it?