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

QQmlJS::Dom::PendingSourceLocationId should not be a QAtomicInt

    XMLWordPrintable

Details

    Description

      PendingSourceLocationId is currently an alias for QAtomicInt. There's no use of other synchronisation around this code, so this looks highly suspicious.

      QAtomicInt has a copy ctor, but we want to get rid of it, because it allows precisely this kind of code to compile. The generated code will be awful, because contemporary compilers tend not to optimize around atomics, even forgetting everything they know about memory upon an atomic operation (they're synchronisation points). On x86, it's not as bad, but on arm-32, the assembly should be horrible with all those extra fences.

      I have a strong suspicion that this could just be an int (or a strong typedef for int), but I lack the overview over this part of the code base to say for sure.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtqmlteam Qt Qml Team User
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes