Subject: Re: bug#65193: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook.

From: Po Lu <[email-masked]>
Date: Fri, 11 Aug 2023 08:02:28 +0800

YAMAMOTO Mitsuharu <[email-masked]> writes:

> What made Lisp evaluation inside read_socket_hook possible since then?

I don't know, but we've done it since then without problems.

> At least it can cause some corruption/inconsistency unless every
> unblock_input/maybe_quit takes account of potential GC (including
> string compaction).  Long-standing code would originally be written
> without such a consideration.  Is it already audited thoroughly?

Can you find any code which saves pointers to string data or buffer text
around calls to functions that might read input?

> Since which version?

I don't know.

> Probably the possibility of encountering the problem would be quite
> low and even if it happens, it is really difficult to reproduce, let
> alone to identify the root cause.

To the best of my knowledge, this is only a problem for the NS port.
Since other ports don't read input from their select emulations.

That is no great loss, given that the toolkit aborts after the first
call to redisplay from outside the main thread, so threads don't work
under NS anyway.