From c50e845793fc80a8711b38d3890e3a42fe4803b8 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 22 Aug 2016 14:35:40 +0200 Subject: [PATCH] ASAN: disable leak detection for flisp. --- src/flisp/flmain.c | 8 ++++++++ src/init.c | 1 + 2 files changed, 9 insertions(+) diff --git a/src/flisp/flmain.c b/src/flisp/flmain.c index 401905cc7a7a8..f3861eed9e8a2 100644 --- a/src/flisp/flmain.c +++ b/src/flisp/flmain.c @@ -8,6 +8,14 @@ extern "C" { #endif +#if defined(__has_feature) +#if __has_feature(address_sanitizer) +const char* __asan_default_options() { + return "detect_leaks=0"; +} +#endif +#endif + static value_t argv_list(fl_context_t *fl_ctx, int argc, char *argv[]) { int i; diff --git a/src/init.c b/src/init.c index 4538e99b2b47f..af07f1a3d42b4 100644 --- a/src/init.c +++ b/src/init.c @@ -51,6 +51,7 @@ JL_DLLEXPORT const char* __asan_default_options() { return "allow_user_segv_handler=1:detect_leaks=0"; // FIXME: enable LSAN after fixing leaks & defining __lsan_default_suppressions(), // or defining __lsan_default_options = exitcode=0 once publicly available + // (here and in flisp/flmain.c) } #endif