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

QML2 hangs when building with gcc 4.6.3 armhf

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0 Alpha
    • 5.2.1, 5.3.1
    • None
    • 81975f5fe72d4e19b36d397248d96d3e86cd13e9 (qtdeclarative)

    Description

      When building Qt with gcc 4.6.3 (the default in Ubuntu 12.04) for armhf, some optimizations go wrong and QML2's v4 compiler hangs during type inference. This was working with 5.2.0.

      After many hours debugging I made following 'work around':

      diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
      index 97114b9..567a8c1 100644
      --- a/src/qml/compiler/qv4ssa.cpp
      +++ b/src/qml/compiler/qv4ssa.cpp
      @@ -1880,7 +1880,11 @@ class TypeInference: public StmtVisitor, public ExprVisitor {
               DiscoveredType type;
               bool fullyTyped;
       
      -        TypingResult(const DiscoveredType &type = DiscoveredType()) : type(type), fullyTyped(type.type != UnknownType) {}
      +        TypingResult(const DiscoveredType &type = DiscoveredType()) {
      +            // avoid optimization bug in gcc 4.6.3 armhf
      +            ((int volatile &) this->type.type) = type.type;
      +            fullyTyped = type.type != UnknownType;
      +        }
               explicit TypingResult(MemberExpressionResolver memberResolver): type(memberResolver), fullyTyped(true) {}
           };
           TypingResult _ty;
      

      Not sure if this makes sense to include in master, but thought it would at least be good to record it here if others run into same issue

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            pjohnsen Pelle Johnsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes