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

Crash in V4 engine on ARM32

    XMLWordPrintable

Details

    • 03c2661b1243cc529fc3d8cfa65073f1da420307 (qtdeclarative)

    Description

      Reincarnation of --QTBUG-55561--. Reported by our potential customers who have been evaluating Qt on a Nvidia Tegra K1 device.

      A bus error cased by
      1) Any directory or JS import statement in a QML file running in a QQuickView;
      2) New'ing any raw object in JavaScript. Remove the property foo, and the bus error goes away.

      import QtQuick 2.0
      
      Item {
          id: root
          property var foo: {
              var f = {};
              return f;
          }
      }
      

      Running GDB

      (gdb) run
      Starting program: /root/openglunderqml
      warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
      [New LWP 654]
      [New LWP 655]
      
      Thread 3 "QQmlThread" received signal SIGBUS, Bus error.
      [Switching to LWP 655]
      0xb61b9cd0 in QV4::Compiler::JSUnitGenerator::writeFunction(char*, QV4::IR::Function*) const () from /usr/lib/libQt5Qml.so.5
      

      This function is in qtdeclarative/src/qml/compiler/qv4compiler.cpp line 280.
      Rerunning with a breakpoint on that function, here is the backtrace

      (gdb) backtrace
      #0  0xb610d158 in QV4::Compiler::JSUnitGenerator::writeFunction(char*, QV4::IR::Function*) const@plt () from /usr/lib/libQt5Qml.so.5
      #1  0xb613b700 in QV4::Compiler::JSUnitGenerator::generateUnit(QV4::Compiler::JSUnitGenerator::GeneratorOption) () from /usr/lib/libQt5Qml.so.5
      #2  0x03189cb0 in ?? ()
      

      It looks like an alignment issue where the argument f in writeFunction (which is cast to a QV4::CompiledData::Function) isn't on an 8-byte boundary.

      Initially reported for 5.8.0 (that already included this fix), then they confirmed this is also reproducible with 5.9.0 (they are building Qt as part of their custom buildroot, if that makes any difference).

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              wearyinside Oleg Yadrov
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes