diff src/regexp.c @ 29191:0af5fe160e4e v8.2.5115

patch 8.2.5115: search timeout is overrun with some patterns Commit: https://github.com/vim/vim/commit/616592e0816d2d9f893fcd95e3e1e0fbc5893168 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 17 15:17:10 2022 +0100 patch 8.2.5115: search timeout is overrun with some patterns Problem: Search timeout is overrun with some patterns. Solution: Check for timeout in more places. Make the flag volatile and atomic. Use assert_inrange() to see what happened.
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 Jun 2022 16:30:06 +0200
parents b90bca860b5a
children d6f8b784d0f6
line wrap: on
line diff
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -22,7 +22,7 @@
 
 #ifdef FEAT_RELTIME
 static int dummy_timeout_flag = 0;
-static const int *timeout_flag = &dummy_timeout_flag;
+static volatile int *timeout_flag = &dummy_timeout_flag;
 #endif
 
 /*