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 16:55:44 +0300

> Date: Fri, 17 Apr 2020 14:22:00 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 40661@debbugs.gnu.org
> 
> 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.

Alternatively, we could set the buffer's inhibit_shrinking flag while
in re_match_2_internal.  Although that flag was introduced for a
different purpose: for when we have stuff inside the gap that we don't
want to lose.  The name of the flag notwithstanding, I'm not sure we
want to conflate these two purposes.  But maybe it's better than
preventing the GC entirely.





reply via email to

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