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

(fc) FileDispatcherImpl.setDirect0 might return uninitialized variable on some platforms

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 11, 17
    • 17
    • core-libs
    • None
    • b17
    • generic
    • generic

    Description

      The variable "result" in Java_sun_nio_ch_FileDispatcherImpl_setDirect0 might be uninitialized, if neither O_DIRECT, F_NOCACHE, or DIRECTIO_ON is defined, because the final #else block is not an assignment, but a comparison.

      https://github.com/openjdk/jdk/blob/7e42642939c0c3b8b872d72890fbb5aab4c3e507/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c

      Attachments

        Issue Links

          Activity

            People

              cgo Christoph Göttschkes
              cgo Christoph Göttschkes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: