summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-04-03 17:50:49 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-04-03 17:50:49 +0300
commit828f1829c8082abd7e3f9221b63d2367ff4b9639 (patch)
tree88400af591ea1ebaec624243178c6415d11a02d1
parentde76862fd6177acd8c5b801af4df73bfab5d98ac (diff)
parentcfcf6de1a83ebb192374836a8c35a317fc2894e1 (diff)
downloadtor-828f1829c8082abd7e3f9221b63d2367ff4b9639.tar.gz
tor-828f1829c8082abd7e3f9221b63d2367ff4b9639.zip
Merge branch 'tor-github/pr/811' into maint-0.4.0
-rw-r--r--changes/bug295275
-rw-r--r--configure.ac5
2 files changed, 10 insertions, 0 deletions
diff --git a/changes/bug29527 b/changes/bug29527
new file mode 100644
index 0000000000..6f36a9e1a0
--- /dev/null
+++ b/changes/bug29527
@@ -0,0 +1,5 @@
+ o Minor features (circuit padding):
+ - Stop warning about undefined behavior in the probability distribution
+ tests. Float division by zero may technically be undefined behaviour in
+ C, but it's well-defined in IEEE 754. Partial backport of 29298.
+ Closes ticket 29527; bugfix on 0.4.0.1-alpha.
diff --git a/configure.ac b/configure.ac
index 17a4d9680e..3304b5cabb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1198,6 +1198,11 @@ if test "$fragile_hardening" = "yes"; then
AC_MSG_ERROR([The compiler supports -fsanitize=undefined, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.*, and with Clang you need libclang_rt.ubsan*])
fi
+ TOR_TRY_COMPILE_WITH_CFLAGS([-fno-sanitize=float-divide-by-zero], also_link, CFLAGS_UBSAN="-fno-sanitize=float-divide-by-zero", true)
+ if test "$tor_cv_cflags__fno_sanitize_float_divide_by_zero" = "yes" && test "$tor_can_link__fno_sanitize_float_divide_by_zero" != "yes"; then
+ AC_MSG_ERROR([The compiler supports -fno-sanitize=float-divide-by-zero, but for some reason I was not able to link when using it. Are you missing run-time support? With GCC you need libasan.*, and with Clang you need libclang_rt.ubsan*])
+ fi
+
TOR_CHECK_CFLAGS([-fno-omit-frame-pointer])
fi