Commit 91d539b0 authored by Philipp Stephani's avatar Philipp Stephani

Suppress leak sanitizer in a few more places

* src/regex-emacs.c (regex_compile):
src/search.c (newline_cache_on_off): Suppress leak sanitizer.
parent 4ea90a71
......@@ -29,6 +29,10 @@
#include <stdlib.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include "character.h"
#include "buffer.h"
#include "syntax.h"
......@@ -1757,6 +1761,9 @@ regex_compile (re_char *pattern, ptrdiff_t size,
/* Initialize the compile stack. */
compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE
* sizeof *compile_stack.stack);
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
__lsan_ignore_object (compile_stack.stack);
#endif
compile_stack.size = INIT_COMPILE_STACK_SIZE;
compile_stack.avail = 0;
......
......@@ -21,6 +21,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include "lisp.h"
#include "character.h"
#include "buffer.h"
......@@ -613,7 +617,12 @@ newline_cache_on_off (struct buffer *buf)
{
/* It should be on. */
if (base_buf->newline_cache == 0)
base_buf->newline_cache = new_region_cache ();
{
base_buf->newline_cache = new_region_cache ();
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
__lsan_ignore_object (base_buf->newline_cache);
#endif
}
}
return base_buf->newline_cache;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment