GNU bug report logs - #65193
29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook.

Previous Next

Package: emacs;

Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Date: Thu, 10 Aug 2023 07:42:01 UTC

Severity: normal

Found in version 29.1.50

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 65193 <at> debbugs.gnu.org
Subject: bug#65193: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook.
Date: Thu, 10 Aug 2023 21:03:31 +0800
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> writes:

> To my understanding, the Lisp evaluator is not reentrant, and thus
> Lisp evaluation inside read_socket_hook, which can be called from
> fairly arbitrary places via unblock_input/maybe_quit, causes
> hard-to-reproduce, spontaneous crashes.

Only if that Lisp is permitted to signal out of those arbitrary places,
since we no longer call read_socket_hook directly from signal handlers.
Mode line format evaluation catches all non-local exits, AFAIK.

> That's really surprising.  I've once heard we shouldn't do that.  Is
> that changed?

I think so, see above.

> My understanding is that GC can only be triggered by eval_sub or
> Ffuncall calls (except explicit garbage_collect calls), but not by
> Lisp object allocations, for example.  Avoiding Lisp evaluation inside
> read_socket_hook also means avoiding GC inside read_socket_hook.

Hmm.  But given that we haven't avoided Lisp evaluation within
read_socket_hook for some time now, that's still a moot point.




This bug report was last modified 1 year and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.