mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-09 21:14:02 +00:00
FS-11516 [build-system] Add --enable-pool-sanitizer configure flag. This will make it easier to find memory issues when using address sanitizer. Also added -fstack-protector-strong when using --enable-address-sanitizer.
This commit is contained in:
committed by
Andrey Volk
parent
8a809624cb
commit
892f0a289f
+12
-2
@@ -1817,11 +1817,21 @@ AC_ARG_ENABLE(address_sanitizer,
|
||||
[enable_address_sanitizer="no"])
|
||||
|
||||
if test "${enable_address_sanitizer}" = "yes"; then
|
||||
APR_ADDTO(CFLAGS, -fsanitize=address -fno-omit-frame-pointer)
|
||||
APR_ADDTO(CXXFLAGS, -fsanitize=address -fno-omit-frame-pointer)
|
||||
APR_ADDTO(CFLAGS, -fsanitize=address -fno-omit-frame-pointer -fstack-protector-strong)
|
||||
APR_ADDTO(CXXFLAGS, -fsanitize=address -fno-omit-frame-pointer -fstack-protector-strong)
|
||||
APR_ADDTO(LDFLAGS, -fsanitize=address)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(,
|
||||
[AC_HELP_STRING([--enable-pool-sanitizer],[build with sanitizer friendly pool behavior])],
|
||||
[enable_pool_sanitizer="$enable_pool_sanitizer"],
|
||||
[enable_pool_sanitizer="no"])
|
||||
|
||||
if test "${enable_pool_sanitizer}" = "yes"; then
|
||||
APR_ADDTO(CFLAGS, -DDESTROY_POOLS)
|
||||
ac_configure_args="$ac_configure_args --enable-pool-debug=yes"
|
||||
fi
|
||||
|
||||
# we never use this, and hard setting it will make cross compile work better
|
||||
ac_cv_file_dbd_apr_dbd_mysql_c=no
|
||||
|
||||
|
||||
Reference in New Issue
Block a user