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

mutexLocker.cpp _mutex_array[] initialization broken with safepoint check change

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b64

      Backports

        Description


        On 2/2/15, 11:54 AM, Claes Redestad wrote:
        > Hi,
        >
        > I know this has been pushed, but I wonder if the removal of _num_mutex++ from
        > the def macro in mutexLocker.cpp was really intentional?
        >
        > It seems to me this means _mutex_array won't initialize properly in the current
        > code, breaking print_owned_locks_on_error (always prints None). Bug?
        >
        > /Claes

         170 #define def(var, type, pri, vm_block, safepoint_check_allowed ) { \
         171 var = new type(Mutex::pri, #var, vm_block, safepoint_check_allowed); \
         172 assert(_num_mutex < MAX_NUM_MUTEX, "increase MAX_NUM_MUTEX"); \
         173 _mutex_array[_num_mutex] = var; \
         174 }

        Should be _num_mutex++ so that there is an array of mutexes (not just one).

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mockner Max Ockner (Inactive)
                  Reporter:
                  coleenp Coleen Phillimore
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: