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

pthread_key_t is casted down into int from long

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • x86_64
    • os_x

      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.

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

              Created:
              Updated:
              Resolved: