Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
29190:a4f0e5e61728 | 29191:0af5fe160e4e |
---|---|
20 # define BT_REGEXP_DEBUG_LOG_NAME "bt_regexp_debug.log" | 20 # define BT_REGEXP_DEBUG_LOG_NAME "bt_regexp_debug.log" |
21 #endif | 21 #endif |
22 | 22 |
23 #ifdef FEAT_RELTIME | 23 #ifdef FEAT_RELTIME |
24 static int dummy_timeout_flag = 0; | 24 static int dummy_timeout_flag = 0; |
25 static const int *timeout_flag = &dummy_timeout_flag; | 25 static volatile int *timeout_flag = &dummy_timeout_flag; |
26 #endif | 26 #endif |
27 | 27 |
28 /* | 28 /* |
29 * Magic characters have a special meaning, they don't match literally. | 29 * Magic characters have a special meaning, they don't match literally. |
30 * Magic characters are negative. This separates them from literal characters | 30 * Magic characters are negative. This separates them from literal characters |