src/hotspot/share/adlc/formsopt.cpp: FrameForm constructor does not initialise all the members

Vladimir Petko vladimir.petko at canonical.com
Mon Jun 12 20:09:03 UTC 2023


Hi,

I would quite happily contribute the fix.

Best Regards,
 Vladimir.

On Tue, Jun 13, 2023 at 12:05 AM Tobias Hartmann
<tobias.hartmann at oracle.com> wrote:
>
> Hi Vladimir,
>
> Thanks for reporting this issue. I think all members should be initialized, RegisterForm has a
> similar issue. I filed https://bugs.openjdk.org/browse/JDK-8309847.
>
> Do you intent to contribute a fix or should we assign it to someone else?
>
> Thanks,
> Tobias
>
> On 09.06.23 00:12, Vladimir Petko wrote:
> > Dear Maintainers,
> >
> >  src/hotspot/share/adlc/formsopt.cpp contains the FrameForm()
> > constructor that does not initialise all of its members. Would it be
> > possible to consider a patch that fixes FrameForm initialisation?
> > Alternatively this class could benefit from adding default member
> > initialisers, e.g.
> > --------cut------------
> > class FrameForm : public Form {
> > private:
> >
> > public:
> > // Public Data
> > char *_sync_stack_slots{};
> > char *_inline_cache_reg{};
> > ....
> > ----------cut--------------
> > and removing initialisation from the constructor.
> >  In this case it would be harder to leave a new member uninitialised
> > and it would be immediately obvious.
> >
> > Best Regards,
> >   Vladimir.


More information about the hotspot-dev mailing list