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

Thomas Stüfe thomas.stuefe at gmail.com
Wed Nov 28 20:09:38 UTC 2018


On Wed, Nov 28, 2018 at 8:53 PM Kim Barrett <kim.barrett at oracle.com> wrote:
>
> > 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.

Thanks for explaining :)

I assumed as much. But I actually prefer the explicit notation since
it saves me some indirection when walking up the base constructors in
an IDE. Otherwise I have to check which class this class derived from.

..Thomas


More information about the serviceability-dev mailing list