mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 22:39:58 -04:00
Merge branch '3510-disable-stringop-overread' into 'main'
Disable stringop-overread with gcc-11+ Address Sanitizer Closes #3510 See merge request isc-projects/bind9!6747
This commit is contained in:
commit
28dfa9adcc
2 changed files with 11 additions and 1 deletions
|
|
@ -968,7 +968,7 @@ unit:gcc:jammy:amd64:
|
|||
gcc:asan:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -Wno-error=stringop-overread"
|
||||
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined"
|
||||
LDFLAGS: "-fsanitize=address,undefined"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-jemalloc"
|
||||
<<: *fedora_35_amd64_image
|
||||
|
|
|
|||
10
configure.ac
10
configure.ac
|
|
@ -119,6 +119,16 @@ STD_CFLAGS="-Wall -Wextra -Wwrite-strings -Wpointer-arith -Wno-missing-field-ini
|
|||
# These should be always errors
|
||||
STD_CFLAGS="$STD_CFLAGS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes -Werror=vla"
|
||||
|
||||
# Disable false positives generated by GCC 11+ and ASAN
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]],
|
||||
[[#if __GNUC__ >= 11 && defined(__SANITIZE_ADDRESS__)
|
||||
#error Address Sanitizer enabled
|
||||
#endif
|
||||
]])],
|
||||
[],
|
||||
[STD_CFLAGS="$STD_CFLAGS -Wno-stringop-overread"])
|
||||
|
||||
STD_LDFLAGS=""
|
||||
|
||||
# ... except in test code
|
||||
|
|
|
|||
Loading…
Reference in a new issue