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

mutexLocker assert_locked_or_safepoint should not access VMThread state from non-VM-thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 16
    • 16
    • hotspot
    • b20

      See here:

      void assert_locked_or_safepoint(const Mutex* lock) {
        // check if this thread owns the lock (common case)
        assert(lock != NULL, "Need non-NULL lock");
        if (lock->owned_by_self()) return;
        if (SafepointSynchronize::is_at_safepoint()) return;
        if (!Universe::is_fully_initialized()) return;
        // see if invoker of VM operation owns it
        VM_Operation* op = VMThread::vm_operation();
        if (op != NULL && op->calling_thread() == lock->owner()) return;
        fatal("must own lock %s", lock->name());
      }

      The call to VMThread::vm_operation() does not check if the calling thread is VMThread. This would fail the assert after JDK-8212107.

            rehn Robbin Ehn
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: