Subject: bug#58042: 29.0.50; ASAN use-after-free in re_match_2_internal

From: Eli Zaretskii <[email-masked]>
Date: Wed, 05 Oct 2022 16:27:27 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  Alan Third
>  <[email-masked]>
> Date: Wed, 05 Oct 2022 13:10:03 +0200
> 
> Can somone please help me understand how this works?
> 
> Let's say we are in memq called for list L.  Fmemq uses FOR_EACH_TAIL,
> which can call maybe_quit, which executes arbitrary Lisp, which can
> modify L.

"Arbitrary Lisp" being redisplay that calls various hooks, like
window-configuration-change-hook etc.?  IOW, this is a macOS only
thing?

Perhaps on macOS probably_quit should bind inhibit_redisplay non-zero?
I see no particular reason to trigger redisplay from maybe_quit.