On 23. Jun 2022, 10:38 +0200, Eli Zaretskii <eliz@gnu.org>, wrote:
Fair enough. But for that purpose, we need to consider each call into
Lisp, either directly or via a hook, as potentially triggering GC.

True.

Moreover, if some code can signal an error or throw to a higher level,
that could cause GC via the handlers installed by the various
unwind-protect forms. So signaling/throwing are also GC triggers, at
least in some situations, and I'm not sure how relevant that is to
what you had in mind.

Also true. 

I don't have something specific in mind, but I might give it a spin, partly because I tend to forget which things can call Lisp (like maybe_quit), partly because it was so boring to follow the calls in this bug, and partly because I can, or could  ;-).

(People also tend to forget that GC doesn't only deletes "garbage"
objects, it also has other potentially "surprising" effects: it can
compact strings, relocate string data and buffer text, shrink regexp
pattern cache and font caches, etc.)
Yeah.   ISTR some fun after I changed the Lisp string implementation for conservative GC.