* src/regex-emacs.c (regex_compile):
src/search.c (newline_cache_on_off): Suppress leak sanitizer.
#include <stdlib.h>
+#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
+#include <sanitizer/lsan_interface.h>
+#endif
+
#include "character.h"
#include "buffer.h"
#include "syntax.h"
/* 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;
#include <config.h>
+#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
+#include <sanitizer/lsan_interface.h>
+#endif
+
#include "lisp.h"
#include "character.h"
#include "buffer.h"
{
/* 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;
}