Subject: bug#75754: styled_format stack usage/GC protection

From: Eli Zaretskii <[email-masked]>
Date: Thu, 23 Jan 2025 07:47:42 +0200

> Date: Wed, 22 Jan 2025 19:39:35 +0000
> From: Pip Cet <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> Pip Cet <[email-masked]> writes:
> 
> > (setq print-unreadable-function
> >       (lambda (&rest args)
> >         (garbage-collect)
> >         (make-string 100 256 t)))
> >
> > (message "%S" (format "%S %S" [1] (symbol-function '+)))
> >
> > fails to print the initial "[1]" here. Changing 256 to ?A and t to nil
> > produces
> >
> > "[1] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
> >
> > GDB session confirms the bug is as I've described.
> 
> Patch:

Thanks.

Paul, any comments on the issue and/or the patch?