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

qmlsc: Crash when using lists of Actions

    XMLWordPrintable

Details

    • 8ea9646019 (qt/qtdeclarative/dev) 8ea9646019 (qt/qtdeclarative/6.4) 8ea9646019 (qt/tqtc-qtdeclarative/6.4)

    Description

      The following QML code crashes qmlsc:

      Item {
          id: myItem
          readonly property var foo: myItem.actionList
          readonly property list<Action> actionList: [
              Action {}
          ]
      }
      

       

      Stacktrace: 

      #0  QQmlJSScope::accessSemantics (this=0x0) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljsscope_p.h:482
      #1  QQmlJSTypeResolver::listType (this=this@entry=0x7ffc0dfd6358, elementType=..., mode=mode@entry=QQmlJSTypeResolver::UseListReference)
          at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:147
      #2  0x00007f52d7e22984 in operator() (__closure=0x7ffc0dfd31b0, scope=..., mode=<optimized out>) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:1014
      #3  0x00007f52d7e2367e in operator()<QDeferredSharedPointer<const QQmlJSScope> > (mode=QQmlJSScope::NotExtension, scope=..., this=<synthetic pointer>)
          at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljsutils_p.h:191
      #4  QQmlJSUtils::searchBaseAndExtensionTypes<QDeferredSharedPointer<const QQmlJSScope>, QQmlJSTypeResolver::memberType(const ConstPtr&, const QString&) const::<lambda(const ConstPtr&, QQmlJSSc
      ope::ExtensionKind)> > (check=..., type=...) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljsutils_p.h:225      
      #5  QQmlJSTypeResolver::memberType (this=this@entry=0x7ffc0dfd6358, type=..., name=...) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:1053
      #6  0x00007f52d7e23e3a in QQmlJSTypeResolver::memberType (this=this@entry=0x7ffc0dfd6358, type=..., name=...) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:1099
      #7  0x00007f52d7e0638f in QQmlJSTypePropagator::propagatePropertyLookup (this=0x7ffc0dfd5060, propertyName=...) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstypepropagator.cpp:710
      #8  0x00007f52d7e07b5f in QQmlJSTypePropagator::generate_GetLookup (this=<optimized out>, index=<optimized out>) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstypepropagator.cpp:886
      #9  0x00007f52d78a8ad1 in QV4::Moth::ByteCodeHandler::decode (this=this@entry=0x7ffc0dfd5060, code=0x184ea34 "\030\006\002", len=<optimized out>)
          at /home/qt/work/qt/qtdeclarative/src/qml/compiler/qv4bytecodehandler.cpp:77
      #10 0x00007f52d7e0c129 in QQmlJSTypePropagator::run (this=0x7ffc0dfd5060, function=<optimized out>, error=<optimized out>)
          at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljstypepropagator.cpp:78
      #11 0x000000000040f2d7 in ?? ()
      #12 0x000000000041022d in ?? ()
      #13 0x00007f52d7d6909c in operator() (bindingOrFunction=..., __closure=<synthetic pointer>) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:327
      #14 std::for_each<__gnu_cxx::__normal_iterator<BindingOrFunction*, std::vector<BindingOrFunction> >, qCompileQmlFile(QmlIR::Document&, const QString&, QQmlJSSaveFunction, QQmlJSAotCompiler*, Q
      QmlJSCompileError*, bool, QV4::Compiler::CodegenWarningInterface*, const QString*)::<lambda(const BindingOrFunction&)> > (__f=..., __last={m_binding = 0x1d3c360, m_function = 0x31},            
          __first=...) at /opt/rh/gcc-toolset-10/root/usr/include/c++/10/bits/stl_algo.h:3844
      #15 qCompileQmlFile(QmlIR::Document&, QString const&, std::function<bool (QV4::CompiledData::SaveableUnitPointer const&, QMap<int, QQmlJSAotFunction> const&, QString*)>, QQmlJSAotCompiler*, QQ
      mlJSCompileError*, bool, QV4::Compiler::CodegenWarningInterface*, QString const*) (irDocument=..., inputFileName=..., saveFunction=..., aotCompiler=aotCompiler@entry=0x7ffc0dfd6350,            
          error=error@entry=0x7ffc0dfd60f0, storeSourceLocation=<optimized out>, interface=<optimized out>, fileContents=<optimized out>)
          at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:350
      #16 0x00007f52d7d6a316 in qCompileQmlFile(QString const&, std::function<bool (QV4::CompiledData::SaveableUnitPointer const&, QMap<int, QQmlJSAotFunction> const&, QString*)>, QQmlJSAotCompiler*
      , QQmlJSCompileError*, bool, QV4::Compiler::CodegenWarningInterface*, QString const*) (inputFileName=..., saveFunction=..., aotCompiler=0x7ffc0dfd6350, error=0x7ffc0dfd60f0,                    
          storeSourceLocation=<optimized out>, interface=0x4294a8, fileContents=0x0) at /home/qt/work/qt/qtdeclarative/src/qmlcompiler/qqmljscompiler.cpp:211
      #17 0x000000000040b29f in ?? ()
      #18 0x00007f52d6a49550 in __libc_start_call_main () from /lib64/libc.so.6
      #19 0x00007f52d6a49609 in __libc_start_main_impl () from /lib64/libc.so.6
      #20 0x000000000040b61e in ?? ()
      

       

      The attached example reproduces the case.

       

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              cajus Cajus Pollmeier
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes