Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8338449

ubsan: division by zero in sharedRuntimeTrans.cpp

XMLWordPrintable

    • b22

        When running with ubsan enabled binaries on Linux ppc64le, these divisions by zero are detected.

        test
        java/lang/Math/Log10Tests.java: Tests for {Math, StrictMath}.log10
         
        ----------stderr:(4/324)----------
        /jdk/src/hotspot/share/runtime/sharedRuntimeTrans.cpp:219:27: runtime error: division by zero
            #0 0x7fffa7e14abc in SharedRuntime::dlog10(double) (/build_ubsan/images/jdk/lib/server/libjvm.so+0x69f4abc)
            #1 0x7fff8b8fc8e8 (<unknown module>)
         
        test
        java/lang/Math/LogTests.java: Tests for {Math, StrictMath}.log
         
        /jdk/src/hotspot/share/runtime/sharedRuntimeTrans.cpp:125:27: runtime error: division by zero
            #0 0x7fff887f48bc in __ieee754_log(double) (/build_ubsan/images/jdk/lib/server/libjvm.so+0x69f48bc)
            #1 0x7fff6b8fc768 (<unknown module>)
         
        test
        java/lang/Math/PowTests.java: Tests for {Math, StrictMath}.pow
         
        /jdk/src/hotspot/share/runtime/sharedRuntimeTrans.cpp:508:23: runtime error: division by zero
            #0 0x7fff92fd61f0 in SharedRuntime::dpow(double, double) (/build_ubsan/images/jdk/lib/server/libjvm.so+0x69f61f0)
            #1 0x7fff7701c8ec (<unknown module>)
         
         
        Might be that these divisions are desired so we could consider excluding the code from ubsan checks.
        For some reason I do not see the failures on Linux x86_64 when running those tests .

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: