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

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jun 12 12:05:45 UTC 2023


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