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

AsyncLogWriter should not overide is_Named_thread()

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 18
    • hotspot
    • b03
    • generic
    • generic

    Description

      Comments from David Holmes:
      "
      BTW: I noticed a separate bug in the crash log. You've defined:

      bool is_Named_thread() const override { return true; }

      for the AsyncLogWriter, but as you pointed out when I asked, this thread
      can't be a NamedThread because that is a special kind of GC thread. So
      that method should not be there.
      "

      I misunderstood is_Named_thread(). I thought it should return true as long as it has a name. It's incorrect! Only NamedThread and its subclasses return true.

      Code like this is undefined for AsyncLogWriter. Its vtable doesn't have the entry for gc_id().

      uint GCId::current_or_undefined() {
        return Thread::current()->is_Named_thread() ? currentNamedthread()->gc_id() : undefined();
      }

      Attachments

        Issue Links

          Activity

            People

              xliu Xin Liu
              xliu Xin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: