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

Crash when declaring an alias to a readonly object-typed subproperty

    XMLWordPrintable

Details

    • 32072884bdba99205d7f681382b0fcf83d292c6d (qt/tqtc-qtdeclarative/5.15)

    Description

      The following code snippet leads to an instant segfault:

      import QtQml 2.15
      
      QtObject {
          id: obj
      
          readonly property QtObject subObj: QtObject {
              property bool foo: false
          }
      
          readonly property QtObject subObj2: QtObject {
              property alias foo: obj.subObj.foo
          }
      }
      

      As I understand QML, this should not even go through the parser, because the alias declaration refers to a subproperty of a readonly property (readonly, but not not constant! i.e. it could still change through bindings, internal shenanigans...).

      Attachments

        1. backtrace.txt
          4 kB
          Arno Rehn
        2. testcrash.qml
          0.2 kB
          Arno Rehn
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            msarehn Arno Rehn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes