Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69996

Using an Uninitialized Variable

    XMLWordPrintable

    Details

    • Commits:
      934d93b9151134116d0fe23234ee9d0519a969ba

      Description

      Hello,

      When building the MASM library for 64 bit architectures, an unused variable was detected in the function:

          explicit ALWAYS_INLINE MatchResult(EncodedMatchResult encoded)
          {
              union u {
                  uint64_t encoded;
                  struct s {
                      size_t start;
                      size_t end;
                  } split;
              } value;
              value.encoded = encoded;
              start = value.split.start;
              end = value.split.end;
          }
      
      

      in the file qtdeclarative/src/3rdparty/masm/runtime/MatchResult.h

      Usually, on 64bit architectures, size_t equals the size of uint64_t, so this could lead to the value of end not being properly populated.

        Attachments

        For Gerrit Dashboard: QTBUG-69996
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            erikv Erik Verbruggen
            Reporter:
            nvelinov Nikola Velinov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes