Commit 06310cf9 authored by Philipp Stephani's avatar Philipp Stephani

Use a more precise check for '__lsan_ignore_object'

* configure.ac: Add check for __lsan_ignore_object.

* src/buffer.c (enlarge_buffer_text):
* src/data.c (make_blv):
* src/emacs-module.c (Fmodule_load, initialize_environment):
* src/regex-emacs.c (regex_compile):
* src/search.c (newline_cache_on_off): Use new configuration macro.
parent a2323c7c
Pipeline #6187 passed with stage
in 57 minutes and 20 seconds
...@@ -4516,7 +4516,7 @@ AC_CHECK_FUNCS_ONCE([sbrk]) ...@@ -4516,7 +4516,7 @@ AC_CHECK_FUNCS_ONCE([sbrk])
AC_FUNC_FORK AC_FUNC_FORK
AC_CHECK_FUNCS(snprintf) AC_CHECK_FUNCS(snprintf __lsan_ignore_object)
dnl Check for glib. This differs from other library checks in that dnl Check for glib. This differs from other library checks in that
dnl Emacs need not link to glib unless some other library is already dnl Emacs need not link to glib unless some other library is already
......
...@@ -5087,7 +5087,7 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta) ...@@ -5087,7 +5087,7 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta)
#else #else
p = xrealloc (b->text->beg, new_nbytes); p = xrealloc (b->text->beg, new_nbytes);
#endif #endif
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (p); __lsan_ignore_object (p);
#endif #endif
......
...@@ -1788,7 +1788,7 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded, ...@@ -1788,7 +1788,7 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded,
set_blv_defcell (blv, tem); set_blv_defcell (blv, tem);
set_blv_valcell (blv, tem); set_blv_valcell (blv, tem);
set_blv_found (blv, false); set_blv_found (blv, false);
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (blv); __lsan_ignore_object (blv);
#endif #endif
return blv; return blv;
......
...@@ -1103,7 +1103,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0, ...@@ -1103,7 +1103,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0,
if (module_assertions) if (module_assertions)
{ {
rt = xmalloc (sizeof *rt); rt = xmalloc (sizeof *rt);
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (rt); __lsan_ignore_object (rt);
#endif #endif
} }
...@@ -1426,7 +1426,7 @@ initialize_environment (emacs_env *env, struct emacs_env_private *priv) ...@@ -1426,7 +1426,7 @@ initialize_environment (emacs_env *env, struct emacs_env_private *priv)
if (module_assertions) if (module_assertions)
{ {
env = xmalloc (sizeof *env); env = xmalloc (sizeof *env);
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (env); __lsan_ignore_object (env);
#endif #endif
} }
......
...@@ -1761,7 +1761,7 @@ regex_compile (re_char *pattern, ptrdiff_t size, ...@@ -1761,7 +1761,7 @@ regex_compile (re_char *pattern, ptrdiff_t size,
/* Initialize the compile stack. */ /* Initialize the compile stack. */
compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE
* sizeof *compile_stack.stack); * sizeof *compile_stack.stack);
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (compile_stack.stack); __lsan_ignore_object (compile_stack.stack);
#endif #endif
compile_stack.size = INIT_COMPILE_STACK_SIZE; compile_stack.size = INIT_COMPILE_STACK_SIZE;
......
...@@ -619,7 +619,7 @@ newline_cache_on_off (struct buffer *buf) ...@@ -619,7 +619,7 @@ newline_cache_on_off (struct buffer *buf)
if (base_buf->newline_cache == 0) 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 #ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (base_buf->newline_cache); __lsan_ignore_object (base_buf->newline_cache);
#endif #endif
} }
......
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