mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
bifcl: Disable LeakSanitizer
Related to https://github.com/zeek/zeek/issues/699
This commit is contained in:
parent
81b23aff92
commit
c60bd14d56
1 changed files with 21 additions and 0 deletions
|
@ -294,8 +294,29 @@ void finish_alternative_mode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GCC uses __SANITIZE_ADDRESS__, Clang uses __has_feature
|
||||||
|
#if defined(__SANITIZE_ADDRESS__)
|
||||||
|
#define USING_ASAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__has_feature)
|
||||||
|
#if __has_feature(address_sanitizer)
|
||||||
|
#define USING_ASAN
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USING_ASAN)
|
||||||
|
#include <sanitizer/lsan_interface.h>
|
||||||
|
#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
|
||||||
|
// behavior of LSAN to treat leaks as errors only trips up Zeek's build.
|
||||||
|
__lsan_disable();
|
||||||
|
#endif
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
while ( (opt = getopt(argc, argv, "p:s")) != -1 )
|
while ( (opt = getopt(argc, argv, "p:s")) != -1 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue