summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-02 08:59:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-03-02 11:31:51 +0100
commit6a4504bba84dcbaeb71869ec5c9ed6dfdc090619 (patch)
treebf82fcfe4fbcda230a662c30a5418886ca247c62
parent9bb9589d7ada8339ee0c1212df277fa8f035e402 (diff)
Disable -fsanitize=float-divide-by-zero in rtl_math_atanh
...which relies on division by zero producing inf, for atanh(1) = inf. (As tested by CppunitTest_sal_rtl.) Change-Id: I0e5de8850ab4cbd05f83027c1eb548e2e0c9a9b2 Reviewed-on: https://gerrit.libreoffice.org/50613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sal/rtl/math.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 8435715a1afc..eef48b57e74e 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -1277,6 +1277,9 @@ double SAL_CALL rtl_math_log1p(double fValue) SAL_THROW_EXTERN_C()
}
double SAL_CALL rtl_math_atanh(double fValue) SAL_THROW_EXTERN_C()
+#if defined __clang__
+ __attribute__((no_sanitize("float-divide-by-zero"))) // atahn(1) -> inf
+#endif
{
return 0.5 * rtl_math_log1p(2.0 * fValue / (1.0-fValue));
}