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

native_thread not protected by TLH

XMLWordPrintable

    • jfr
    • b22


        In jfrJavaSupport.cpp:

            static JavaThread* get_native(jobject thread) {
              ThreadsListHandle tlh;
              JavaThread* native_thread = NULL;
              (void)tlh.cv_internal_thread_to_JavaThread(thread, &native_thread, NULL);
              return native_thread;
            }

        This code seems to return a native thread after the TLH that protects it returns so appears unsafe.

              mgronlun Markus Grönlund
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: