Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3316,10 +3316,14 @@ AC_ARG_WITH([address_sanitizer],
AC_MSG_RESULT([$withval])
BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
LDFLAGS="-fsanitize=address $LDFLAGS"
with_asan="yes"
# ASan works by controlling memory allocation, our own malloc interferes.
with_pymalloc="no"
],
[AC_MSG_RESULT([no])])
[
AC_MSG_RESULT([no])
with_asan="no"
])

AC_MSG_CHECKING([for --with-memory-sanitizer])
AC_ARG_WITH(
Expand All @@ -3333,11 +3337,16 @@ AC_MSG_RESULT([$withval])
AX_CHECK_COMPILE_FLAG([-fsanitize=memory],[
BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
with_msan="yes"
],[AC_MSG_ERROR([The selected compiler doesn't support memory sanitizer])])
# MSan works by controlling memory allocation, our own malloc interferes.
with_pymalloc="no"
with_msan="no"
],
[AC_MSG_RESULT([no])])
[
AC_MSG_RESULT([no])
with_msan="no"
])

AC_MSG_CHECKING([for --with-undefined-behavior-sanitizer])
AC_ARG_WITH(
Expand Down Expand Up @@ -4355,6 +4364,14 @@ AC_SUBST([CARGO_TARGET_DIR])
AC_SUBST([CARGO_PROFILE])
AC_SUBST([CARGO_TARGET])

dnl do not enable Rust code if certain sanitizers are enabled
dnl asan works fine, but msan requires the entire binary to be instrumented
dnl ubsan and tsan cause the bindings generation to fail, so they are disabled for now
if test "$with_msan" == "yes" || "$with_ubsan" == "yes" || "$with_tsan" == "yes";
then
HAVE_CARGO="no"
fi


dnl detect sqlite3 from Emscripten emport
PY_CHECK_EMSCRIPTEN_PORT([LIBSQLITE3], [-sUSE_SQLITE3])
Expand Down
Loading