Details
Description
The change "Fix QSocketNotifier constructor" from 2018-05-09, SHA-1 43451e3bc17467593df64cb73ce8c0bf9e60045f, creates a negative refcount.
The reason was the change from
Shiboken::AutoDecRef fileNoValue(PyObject_CallObject(fileNo, 0));
to
Shiboken::AutoDecRef socket(%PYARG_1);
The first version creates a reference that the Shiboken::AutoDecRef later removes when it goes out of scope.
The second version assigns a variable without creating a reference, and so Shiboken::AutoDecRef removes one reference too much and creates a crash in debug Python.
This bug was not detected for a long time, because we do not test a debug Python version in COIN. This is bad, because uncaught reference leaks can cause random crashes which are hard to locate.