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

Stack Overflow QV4::Value with recursive Array toQString

XMLWordPrintable

    • Windows

      If a recursive JS Array is constructed and that array is trying to be converted into a string the entire application crashes with a stack overflow.

      With the old QScriptEngine this simply produced a string, as do all tested browser implementations ("test: ,,,,,,," in case of the snippet below).

      "QV4_CRASH_ON_STACKOVERFLOW" is not set.

      The JS code to reproduce is the following:

      function StackOverflow() {
          var ret = [];
          for (var i = 7; 0 <= i; --i) {
              ret.push(ret);
              }

          return "test: " + ret;
      }
      StackOverflow();

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

            qtqmlteam Qt Qml Team User
            dfabian Daniel Fabian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes