diff options
| author | Mark Wielaard <[email protected]> | 2015-05-31 22:37:19 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2015-06-05 14:52:29 +0200 |
| commit | 170f1bb0a8f49cd6c5e7b34aaa505928764866bb (patch) | |
| tree | dd5fc0594d3b6918f5bb121776c0c50cdab3ed0a /lib/eu-config.h | |
| parent | 616489da5005c63fe572df422f1936529c4743f5 (diff) | |
Fix sanitize-undefined config check. Don't ALLOW_UNALIGNED when checking.
The -fsanitize=undefined check need to use AC_LINK_IFELSE to make sure
libubsan is installed. When doing undefined checking we should disable
ALLOW_UNALIGNED memory accesses to catch issues where we do unaligned
accesses by accident.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'lib/eu-config.h')
| -rw-r--r-- | lib/eu-config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/eu-config.h b/lib/eu-config.h index 5bb21c14..400cdc6e 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -73,7 +73,8 @@ /* Define ALLOW_UNALIGNED if the architecture allows operations on unaligned memory locations. */ -#if defined __i386__ || defined __x86_64__ +#define SANITIZE_UNDEFINED 1 +#if (defined __i386__ || defined __x86_64__) && ! CHECK_UNDEFINED # define ALLOW_UNALIGNED 1 #else # define ALLOW_UNALIGNED 0 |
