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

pthread_key_t is casted down into int from long

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      In os::allocate_thread_local_storage (file os_bsd.cpp) we cast pthread_key_t down from "unsigned long" into "int".

      We should use either "unsigned long" or at the least add a check to make sure that the value of pthread_key_t <= MAX(int)

      Notice: pthread_key_t on Linux (os_linux.cpp) is (unsigned int), so this is only an issue on BSD.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gziemski Gerard Ziemski
                Reporter:
                gziemski Gerard Ziemski
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: