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

Locking with _no_safepoint_check_flag does not check NJT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 18
    • 18
    • hotspot

      Mutex::check_no_safepoint_state() doesn't check NonJavaThreads have called the Mutex without _no_safepoint_check_flag.

      void Mutex::check_no_safepoint_state(Thread* thread) {
        check_block_state(thread);
        assert(!thread->is_active_Java_thread() || _safepoint_check_required != _safepoint_check_always,
               "This lock should always have a safepoint check for Java threads: %s",
               name());
      }
      But Mutex::check_safepoint_state() does check NonJavaThreads.

      NonJavaThreads don't participate in the safepoint protocol but we should make these consistent at least.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: