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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u67
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b29
    • CPU:
      x86
    • OS:
      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

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: