diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-02 03:05:02 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-02 03:09:35 +0100 |
commit | 0beeb6760b166b21fc2d9cbe593100fb28e65e00 (patch) | |
tree | 335a54c95f8a3a0f2ad6f34d7cbcaa016370239c /configure.ac | |
parent | Merge pull request #5594 from ton31337/feature/rhel8_docker (diff) | |
download | frr-0beeb6760b166b21fc2d9cbe593100fb28e65e00.tar.xz frr-0beeb6760b166b21fc2d9cbe593100fb28e65e00.zip |
configure.ac: add --enable-undefined-sanitizer
For UBSan
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0bfcc833f..a9784842e 100755 --- a/configure.ac +++ b/configure.ac @@ -334,6 +334,13 @@ if test "$enable_memory_sanitizer" = "yes"; then SAN_FLAGS="-fsanitize=memory -fPIE -pie" ]) fi +if test "$enable_undefined_sanitizer" = "yes"; then + AC_C_FLAG([-fsanitize=undefined], [ + AC_MSG_ERROR([$CC does not support UndefinedBehaviorSanitizer.]) + ], [ + SAN_FLAGS="-fsanitize=undefined" + ]) +fi AC_SUBST([SAN_FLAGS]) dnl ---------- @@ -576,6 +583,8 @@ AC_ARG_ENABLE([thread-sanitizer], AS_HELP_STRING([--enable-thread-sanitizer], [enable ThreadSanitizer support for detecting data races])) AC_ARG_ENABLE([memory-sanitizer], AS_HELP_STRING([--enable-memory-sanitizer], [enable MemorySanitizer support for detecting uninitialized memory reads])) +AC_ARG_ENABLE([undefined-sanitizer], + AS_HELP_STRING([--undefined-sanitizer], [enable UndefinedBehaviorSanitizer support for detecting undefined behavior])) AC_ARG_WITH([crypto], AS_HELP_STRING([--with-crypto=<internal|openssl>], [choose between different implementations of cryptographic functions(default value is --with-crypto=internal)])) |