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: Fri, 17 Apr 2020 18:50:27 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Richard Copley <rcopley@gmail.com>,  dancol@dancol.org,
>   40661@debbugs.gnu.org
> Date: Fri, 17 Apr 2020 11:28:49 -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.

> I think a better fix is to move the execution of compact_buffer:
> there's no reason it has to be done during GC, we just need to do it
> "every once in a while" and the GC was a convenient point for that.
> But we could avoid several such problems if we were to run such
> background tasks elsewhere.  It could still be linked to GC, e.g. we
> could start a timer during the GC so its run at the next
> opportunity.

That's a project for another pandemic ;-)  I want a simple enough
solution for now that we could install on the release branch.





reply via email to

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