Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263504

Some OutputMachOpcodes fields are uninitialized

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b14

      Backports

        Description

        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;
          int end_rematerialize;
          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().

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: