[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR (S) 8212207: runtime/InternalApi/ThreadCpuTimesDeadlock.java crashes with SEGV in pthread_ge
From:       Thomas_Stüfe <thomas.stuefe () gmail ! com>
Date:       2018-11-28 20:09:38
Message-ID: CAA-vtUx3i3p-5puWSJUXoZB+4PhqM4RQ3JwGPRdC_8-Sw9m5Tw () mail ! gmail ! com
[Download RAW message or body]

On Wed, Nov 28, 2018 at 8:53 PM Kim Barrett <kim.barrett@oracle.com> wrote:
>
> > On Nov 28, 2018, at 2:26 AM, David Holmes <david.holmes@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic