-
Bug
-
Resolution: Fixed
-
P4
-
17, 18
-
b03
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311568 | 17.0.9 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
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();
}
"
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();
}
- backported by
-
JDK-8311568 AsyncLogWriter should not overide is_Named_thread()
- Resolved
- relates to
-
JDK-8229517 Support for optional asynchronous/buffered logging
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/8a9162fb
-
Commit openjdk/jdk/02c9bf08
-
Review openjdk/jdk17u-dev/1544
-
Review openjdk/jdk/4503
(1 links to)