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

Creating a QJSEngine results in a segfault on Sparc64

    XMLWordPrintable

Details

    • 73f1fa8a8ec53d9ebb4a052a1f109e54cd834a87

    Description

      Running this code:

      #include <QtGui/QGuiApplication>
      #include <QtQml/QJSEngine>
      
      int main(int argc, char **argv) {
          QGuiApplication app(argc, argv);
          QJSEngine engine;
          return 0;
      }
      

      results in the following crash on Sparc64 architecture:

      #0  __memcpy_large () at ../sysdeps/sparc/sparc64/memcpy.S:359
      No locals.
      #1  0xffff80010030ffbc in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>)
          at /usr/include/sparc64-linux-gnu/bits/string3.h:53
      No locals.
      #2  QV4::Value::m (this=<optimized out>) at jsruntime/qv4value_p.h:119
              b = 0xffff800100110700
      #3  QV4::Object::d (this=<optimized out>) at jsruntime/qv4object_p.h:148
      No locals.
      #4  QV4::Object::internalClass (this=<optimized out>) at jsruntime/qv4object_p.h:159
      No locals.
      #5  QV4::Object::engine (this=<optimized out>) at jsruntime/qv4object_p.h:228
      No locals.
      #6  QV4::Object::insertMember (attributes=..., v=..., s=<optimized out>, this=0x0) at jsruntime/qv4object_p.h:221
      No locals.
      #7  QV4::Object::defineReadonlyProperty (this=this@entry=0x0, name=0xffff800108530248, value=...) at jsruntime/qv4object.cpp:200
      No locals.
      #8  0xffff800100371ea0 in QV4::TypedArrayPrototype::init (this=this@entry=0x0, engine=engine@entry=0x16c620, ctor=0x0)
          at jsruntime/qv4typedarray.cpp:398
              scope = {engine = 0x16c620, mark = 0xffff800108530328}
      #9  0xffff8001002b6150 in QV4::ExecutionEngine::ExecutionEngine (this=0x16c620, factory=<optimized out>) at jsruntime/qv4engine.cpp:368
              i = 0
              argsClass = <optimized out>
              functionProtoClass = <optimized out>
              o = <optimized out>
              gcBlocker = {mm = 0x146df0, wasBlocked = false}
              index = 2
              scope = {engine = 0x16c620, mark = 0xffff800108530318}
              name = <optimized out>
      #10 0xffff800100448074 in QV8Engine::QV8Engine (this=0x169520, qq=<optimized out>) at qml/v8/qv8engine.cpp:144
              _qml_memory_scope = {pushed = false}
      #11 0xffff80010027039c in QJSEngine::QJSEngine (this=0x7fefffff1d0) at jsapi/qjsengine.cpp:252
      No locals.
      #12 0x0000000000100808 in main (argc=<optimized out>, argv=0x7fefffff578) at test.cpp:6
              app = <incomplete type>
              engine = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0xffff8001013f5c70 <QObject::staticMetaObject>, 
                    stringdata = 0xffff8001004b8598 <qt_meta_stringdata_QJSEngine>, data = 0xffff8001004b8558 <qt_meta_data_QJSEngine>, 
                    static_metacall = 0xffff800100270270 <QJSEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, 
                    relatedMetaObjects = 0x0, extradata = 0x0}}, d = 0x0}
      

      I am happy to provide any other debugging information if needed.

      Attachments

        1. qtdecl5.patch.1
          0.7 kB
        2. qtdecl5.patch.3
          1 kB
        3. qtdecl5.patch.6
          2 kB
        4. sparc64_v2.diff
          2 kB
        5. sparc64.patch
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-56264
          # Subject Branch Project Status CR V

          Activity

            People

              qtqmlteam Qt Qml Team User
              mandriver Dmitry Shachnev
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes