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

QScriptEngine crashes on trivial script with android-clang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.3, 5.13.1, 5.14.0 Alpha
    • 5.9.2, 5.9.5, 5.11.1, 5.12.0 Beta 1, 5.12.0 Beta 2, 5.12.0 Beta 4, 5.12.0 RC, 5.12.0
    • Qt Script
    • Android
    • 9b0fcf7943e63f35cf7d13c7771cb0185178e9fa 4749a3ec61859e324f14add3008c41f92e6c2793 (qt/qtscript/5.12)

    Description

      The following project contains a minimum example using QScriptEngine. This example runs fine on Windows, and it also runs fine when built with prebuilt Qt for Android (android-g++ mkspec, android_armv7).

      # untitled.pro
      QT -= gui
      
      QT += script
      
      CONFIG += c++11 console
      CONFIG -= app_bundle
      
      SOURCES += main.cpp
      
      //main.cpp
      #include <QCoreApplication>
      #include <QScriptEngine>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          QScriptEngine myEngine;
          QScriptValue val = myEngine.evaluate("40 + 2");
          qDebug() << val.toString();
      
          return a.exec();
      }
      

      When building + running this example with a self-built Qt that is using android-clang mkspec, I get the fhe following crash:

      F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xf11000b4 in tid 13718 (QtMainThread)

       

      Callstack from Qt Creator:

      1 QTJSC::Interpreter::privateExecute(QTJSC::Interpreter::ExecutionFlag, QTJSC::RegisterFile *, QTJSC::ExecState *, QTJSC::JSValue *) 0xcafb7850
      2 QTJSC::Interpreter::execute(QTJSC::EvalExecutable *, QTJSC::ExecState *, QTJSC::JSObject *, int, QTJSC::ScopeChainNode *, QTJSC::JSValue *) 0xcafb75e2
      3 QTJSC::Interpreter::execute(QTJSC::EvalExecutable *, QTJSC::ExecState *, QTJSC::JSObject *, QTJSC::ScopeChainNode *, QTJSC::JSValue *) 0xcafbcca2
      4 QScriptEnginePrivate::evaluateHelper(QTJSC::ExecState *, int, QTJSC::EvalExecutable *, bool&) 0xcb00082a
      5 QScriptEngine::evaluate(QString const&, QString const&, int) 0xcb0024ba
      6 main main.cpp 10 0xca57c068
      7 startMainMethod(void *) 0xcabaef0e
      8 __pthread_start(void *) 0xe643c0c4
      9 __start_thread 0xe640ed7a
      10 ??

       

       

      Attachments

        1. untitled35.zip
          2 kB
        2. install-debug.apk
          5.37 MB
        For Gerrit Dashboard: QTBUG-67936
        # Subject Branch Project Status CR V

        Activity

          People

            laknoll Lars Knoll
            mar_kus Markus
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes