Integrated: 8263504: Some OutputMachOpcodes fields are uninitialized
Aleksey Shipilev
shade at openjdk.java.net
Mon Mar 15 06:28:09 UTC 2021
On Fri, 12 Mar 2021 12:55:04 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> SonarCloud reports:
> 2 uninitialized fields at the end of the constructor calls
>
> class OutputMachOpcodes : public OutputMap {
> int begin_inst_chain_rule;
> int end_inst_chain_rule;
> int begin_rematerialize; // <--- this
> int end_rematerialize; // <--- and this
> int end_instructions;
> public:
> OutputMachOpcodes(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
> : OutputMap(hpp, cpp, globals, AD, "MachOpcodes"),
> begin_inst_chain_rule(-1), end_inst_chain_rule(-1), end_instructions(-1)
>
> They are written on all paths that I can see, but they should be initialized anyway, at least for proper checks in `closing()`.
This pull request has now been integrated.
Changeset: b371f90f
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/b371f90f
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
8263504: Some OutputMachOpcodes fields are uninitialized
Reviewed-by: kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/2967
More information about the hotspot-compiler-dev
mailing list