bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40661: Crash in regex search during redisplay


From: Eli Zaretskii
Subject: bug#40661: Crash in regex search during redisplay
Date: Sat, 18 Apr 2020 14:57:16 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: rcopley@gmail.com,  dancol@dancol.org,  40661@debbugs.gnu.org
> Date: Fri, 17 Apr 2020 12:00:27 -0400
> 
> >> > Obviously, we cannot allow GC to run while regex routines do their
> >> > work, because they are passed C pointers to buffer text.  The question
> >> > is, where to disable GC?  We could do it inside
> >> > update_syntax_table_forward, but UPDATE_SYNTAX_TABLE_FORWARD is called
> >> > from many places that evidently have no problems with GC.  So my
> >> > suggestion would be to disable GC inside re_match_2_internal instead.
> >> > Comments?
> >> Looks fine to me.
> > So you prefer disabling GC to setting the inhibit_shrinking flag?
> > I tend to agree with Daniel here, FWIW.
> 
> No, what I meant was that I'm fine with doing it "inside
> re_match_2_internal" instead of "inside update_syntax_table_forward".
> But I prefer if the "it" is setting `inhibit_shrinking` instead of
> inhibiting the GC altogether.

OK, thank you and Daniel for the feedback, and thanks to Richard for
finding this bug in the first place.

I installed a fix on the emacs-27 branch, it avoids the crashes in the
recipe posted by Richard.  Please eyeball the fix, in case I made some
stupid mistake (my environment is rather noisy today, so I trust
myself even less than I usually do).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]