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

Should document need for multithread-safe native code under Java 6/7 JNI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6u1
    • Fix Version/s: 7
    • Component/s: docs
    • Subcomponent:
    • Introduced In Build:
      b22
    • Introduced In Version:
      7
    • Resolved In Build:
      rc
    • CPU:
      sparc
    • OS:
      solaris_10
    • Verification:
      Verified

      Description

      Updated description to reflect change in synopsis/subcategory:

      A change in handling of native code in java 1.6 may require the native code to be compiled for multithreaded support (-mt flag on sun studio compiler) to work properly. Use of "errno" is an example. JNI documentation should mention this compiler option.


      Original CR description:

      The C library function "open" should set errno on failure, as documented in the open(2) man page. This works as expected when open is called from a JNI function running under java 1.4.x or 1.5.x. However, under 1.6.0_01 (also tried 1.6.0_02 and 1.7.0-ea-b12) the errno value is not set. See the simple test program in the CR attachments (don't run the test program as superuser, as it relies on 000 permissions being unreadable).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ikrylov Ivan Krylov
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: