Skip to content

Commit 4fbe384

Browse files
iakovjcfr
authored andcommitted
[Backport] CI for CONFIG+=debug + UbSan for tests
Fix UBSAN error for invalid access through pointer. This happens only for Python2 because Py_DECREF is slightly different. Still, I have no opinion if UBSAN is right or wrong here, but this problem occures with the latest XCode/clang available too. (cherry picked from commit MeVisLab/pythonqt@2483ffb)
1 parent 5d89887 commit 4fbe384

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PythonQtSignal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ PythonQtSignalFunction_New(PythonQtSlotInfo *ml, PyObject *self, PyObject *modul
9999
/* Methods (the standard built-in methods, that is) */
100100

101101
static void
102-
meth_dealloc(PythonQtSignalFunctionObject *m)
102+
meth_dealloc(PyObject *o)
103103
{
104-
PyObject_GC_UnTrack(m);
104+
PyObject_GC_UnTrack(o);
105+
auto m = reinterpret_cast<PythonQtSignalFunctionObject*>(o);
105106
if (m->_dynamicInfo) {
106107
delete m->_dynamicInfo;
107108
m->_dynamicInfo = nullptr;

0 commit comments

Comments
 (0)