mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bifcl: Prevent use of LeakSanitizer on FreeBSD
This commit is contained in:
parent
34c4f678cf
commit
ae56d45a1f
1 changed files with 6 additions and 4 deletions
|
@ -311,17 +311,19 @@ void finish_alternative_mode()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USING_ASAN)
|
// FreeBSD doesn't support LeakSanitizer
|
||||||
|
#if defined(USING_ASAN) && !defined(__FreeBSD__)
|
||||||
#include <sanitizer/lsan_interface.h>
|
#include <sanitizer/lsan_interface.h>
|
||||||
|
#define BIFCL_LSAN_DISABLE(x) __lsan_disable(x)
|
||||||
|
#else
|
||||||
|
#define BIFCL_LSAN_DISABLE(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#if defined(USING_ASAN)
|
|
||||||
// We generally do not care at all if bifcl is leaking and the default
|
// We generally do not care at all if bifcl is leaking and the default
|
||||||
// behavior of LSAN to treat leaks as errors only trips up Zeek's build.
|
// behavior of LSAN to treat leaks as errors only trips up Zeek's build.
|
||||||
__lsan_disable();
|
BIFCL_LSAN_DISABLE();
|
||||||
#endif
|
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue