diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex-emacs.c | 7 | ||||
| -rw-r--r-- | src/search.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c index ba7f3cef64b..5c08c81c0b5 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c | |||
| @@ -29,6 +29,10 @@ | |||
| 29 | 29 | ||
| 30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
| 31 | 31 | ||
| 32 | #ifdef HAVE_SANITIZER_LSAN_INTERFACE_H | ||
| 33 | #include <sanitizer/lsan_interface.h> | ||
| 34 | #endif | ||
| 35 | |||
| 32 | #include "character.h" | 36 | #include "character.h" |
| 33 | #include "buffer.h" | 37 | #include "buffer.h" |
| 34 | #include "syntax.h" | 38 | #include "syntax.h" |
| @@ -1757,6 +1761,9 @@ regex_compile (re_char *pattern, ptrdiff_t size, | |||
| 1757 | /* Initialize the compile stack. */ | 1761 | /* Initialize the compile stack. */ |
| 1758 | compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE | 1762 | compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE |
| 1759 | * sizeof *compile_stack.stack); | 1763 | * sizeof *compile_stack.stack); |
| 1764 | #ifdef HAVE_SANITIZER_LSAN_INTERFACE_H | ||
| 1765 | __lsan_ignore_object (compile_stack.stack); | ||
| 1766 | #endif | ||
| 1760 | compile_stack.size = INIT_COMPILE_STACK_SIZE; | 1767 | compile_stack.size = INIT_COMPILE_STACK_SIZE; |
| 1761 | compile_stack.avail = 0; | 1768 | compile_stack.avail = 0; |
| 1762 | 1769 | ||
diff --git a/src/search.c b/src/search.c index ec076c18035..ad5d0302932 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -21,6 +21,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | 23 | ||
| 24 | #ifdef HAVE_SANITIZER_LSAN_INTERFACE_H | ||
| 25 | #include <sanitizer/lsan_interface.h> | ||
| 26 | #endif | ||
| 27 | |||
| 24 | #include "lisp.h" | 28 | #include "lisp.h" |
| 25 | #include "character.h" | 29 | #include "character.h" |
| 26 | #include "buffer.h" | 30 | #include "buffer.h" |
| @@ -613,7 +617,12 @@ newline_cache_on_off (struct buffer *buf) | |||
| 613 | { | 617 | { |
| 614 | /* It should be on. */ | 618 | /* It should be on. */ |
| 615 | if (base_buf->newline_cache == 0) | 619 | if (base_buf->newline_cache == 0) |
| 616 | base_buf->newline_cache = new_region_cache (); | 620 | { |
| 621 | base_buf->newline_cache = new_region_cache (); | ||
| 622 | #ifdef HAVE_SANITIZER_LSAN_INTERFACE_H | ||
| 623 | __lsan_ignore_object (base_buf->newline_cache); | ||
| 624 | #endif | ||
| 625 | } | ||
| 617 | } | 626 | } |
| 618 | return base_buf->newline_cache; | 627 | return base_buf->newline_cache; |
| 619 | } | 628 | } |