aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorPhilipp Stephani2020-08-01 14:13:55 +0200
committerPhilipp Stephani2020-08-01 14:16:22 +0200
commitc3b53559965a4c6f48274c3cbcb43eb6ef23ae14 (patch)
tree6fe3d9675b91957a8062efd2a4f8c593ac3eec09 /src/data.c
parent89127266c93083521d71d8f2314ac88905163fd8 (diff)
downloademacs-c3b53559965a4c6f48274c3cbcb43eb6ef23ae14.tar.gz
emacs-c3b53559965a4c6f48274c3cbcb43eb6ef23ae14.zip
Suppress leak detector in some cases
We intentionally leak some objects. Prevent the ASan leak detector from raising false alarms in these cases. * configure.ac: Search for lsan_interface.h header. * src/data.c (make_blv): Allow leaking of buffer-local values. * src/buffer.c (enlarge_buffer_text): Allow leaking of buffer text. * src/emacs-module.c (Fmodule_load, initialize_environment): Allow intentional leak of runtime and environment objects if module assertions are enabled.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c
index 1db0a983b49..c261e8e90dd 100644
--- a/src/data.c
+++ b/src/data.c
@@ -23,6 +23,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
23#include <math.h> 23#include <math.h>
24#include <stdio.h> 24#include <stdio.h>
25 25
26#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
27#include <sanitizer/lsan_interface.h>
28#endif
29
26#include <byteswap.h> 30#include <byteswap.h>
27#include <count-one-bits.h> 31#include <count-one-bits.h>
28#include <count-trailing-zeros.h> 32#include <count-trailing-zeros.h>
@@ -1784,6 +1788,9 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded,
1784 set_blv_defcell (blv, tem); 1788 set_blv_defcell (blv, tem);
1785 set_blv_valcell (blv, tem); 1789 set_blv_valcell (blv, tem);
1786 set_blv_found (blv, false); 1790 set_blv_found (blv, false);
1791#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
1792 __lsan_ignore_object (blv);
1793#endif
1787 return blv; 1794 return blv;
1788} 1795}
1789 1796