RFR (S) 8212207: runtime/InternalApi/ThreadCpuTimesDeadlock.java crashes with SEGV in pthread_getcpuclockid+0x0

Kim Barrett kim.barrett at oracle.com
Wed Nov 28 19:53:17 UTC 2018


> On Nov 28, 2018, at 2:26 AM, David Holmes <david.holmes at oracle.com> wrote:
> On 28/11/2018 4:30 pm, Thomas Stüfe wrote:
>> P.s.
>> ConcurrentGCThread::ConcurrentGCThread() :
>>   _should_terminate(false), _has_terminated(false) {
>> };
>> I was surprised to see no invocation to the base class ctor in the
>> initializer list. I was not aware that this was even possible. For
>> code clearness, I would prefer the call to the base class ctor to be
>> explicit.)
> 
> I assume it is implicit. But yes it should be explicit.

It is implicit.  In any constructor, if the initializer-list doesn’t contain a call to a
(non-virtual) base class's constructor, an implicit call to the default constructor
for that base class will be inserted at the appropriate place.  (Virtual base
classes are more complicated, but since we avoid using them…)

It’s pretty common usage in our code to not explicitly mention default base class
constructor calls.



More information about the serviceability-dev mailing list