Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-464

Segmentation fault when raising Python error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.0
    • None
    • PySide

    Description

      In SignalManager::qt_metacall of signalmanager.cpp

      PyErr_Restore might cause segment fault. Because it takes away a reference to each object that PyObject_Str(errValue) will fail

      PyErr_Fetch alone should be suffice.

      "you must own a reference to each object before the call and after the call you no longer own these references." – from Python doc site

      PyObject *errType, *errValue, *errTraceback;
      PyErr_Fetch(&errType, &errValue, &errTraceback);
      PyErr_Restore(errType, errValue, errTraceback);

      const QString errString = QLatin1String(Shiboken::String::toCString(PyObject_Str(errValue)));

      Attachments

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

        Activity

          People

            ctismer Christian Tismer
            binbin Binbin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes