[Libreoffice-commits] core.git: sal/rtl

Stephan Bergmann sbergman at redhat.com
Fri Mar 2 10:32:17 UTC 2018


 sal/rtl/math.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6a4504bba84dcbaeb71869ec5c9ed6dfdc090619
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 2 08:59:30 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

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));
 }


More information about the Libreoffice-commits mailing list