diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-25 22:57:56 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-05-25 22:57:56 +0200 |
commit | 8e289f4cc70a8e806bbb36b44ae2b0e9398c0616 (patch) | |
tree | f0e49a14f9e834200ed8fb788741ebacaa81eee2 /vespalib | |
parent | 7c40760245a941e4e7ccaecc7880bf1b78117891 (diff) |
Detect use of clang version of address sanitizer.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/exception_classes/silenceuncaught_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp index a57dd917ce0..8d81d9e0821 100644 --- a/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp +++ b/vespalib/src/tests/exception_classes/silenceuncaught_test.cpp @@ -5,6 +5,14 @@ using namespace vespalib; +#ifndef __SANITIZE_ADDRESS__ +#if defined(__has_feature) +#if __has_feature(address_sanitizer) +#define __SANITIZE_ADDRESS__ +#endif +#endif +#endif + TEST("that uncaught exception causes negative exitcode.") { SlaveProc proc("ulimit -c 0 && exec ./vespalib_caught_uncaught_app uncaught"); proc.wait(); |