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

(fs) bad error handling in java.base/unix/native/libnio/fs/UnixNativeDispatcher.c

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 7u67
    • core-libs
    • b29
    • x86
    • linux

    Backports

      Description

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        Invoking sun.nio.fs.UnixDirectoryStream.closeImpl in certain situation yields "java.io.IOException: Unknown error 18446744073709551615".

        This stems from the error in native function Java_sun_nio_fs_UnixNativeDispatcher_closedir:
        RESTARTABLE(closedir(dirp), err);
        if (errno == -1) {
          throwUnixException(env, errno);
        }
        should be rewritten as
        RESTARTABLE(closedir(dirp), err);
        if (err == -1) {
          throwUnixException(env, errno);
        }
        with err instead of errno.



        REPRODUCIBILITY :
        This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

                igerasim Ivan Gerasimov
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: