1. ob_refcnt of '*module' is 1 too high

    Report

    1
    DL_EXPORT(void)
    init_mysql(void)
    #endif
    {
    PyObject *dict, *module, *emod, *edict;
    utf8conn = mysql_init(NULL);
    utf8conn->charset = &my_charset_utf8mb4_unicode_ci;
    #ifdef IS_PY3K
    module = PyModule_Create(&_mysqlmodule);
    if (!module) return module; /* this really should never happen */
    #else
    module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,
    (PyObject *)NULL, PYTHON_API_VERSION);
    if (!module) return; /* this really should never happen */
    #endif
    #ifdef IS_PY3K
    Py_TYPE(&_mysql_ConnectionObject_Type) = &PyType_Type;
    Py_TYPE(&_mysql_ResultObject_Type) = &PyType_Type;
    #else
    _mysql_ConnectionObject_Type.ob_type = &PyType_Type;
    _mysql_ResultObject_Type.ob_type = &PyType_Type;
    #endif
    #if PY_VERSION_HEX >= 0x02020000
    _mysql_ConnectionObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ResultObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ConnectionObject_Type.tp_new = PyType_GenericNew;
    _mysql_ResultObject_Type.tp_new = PyType_GenericNew;
    #ifndef IS_PY3K
    _mysql_ConnectionObject_Type.tp_free = _PyObject_GC_Del;
    _mysql_ResultObject_Type.tp_free = _PyObject_GC_Del;
    #endif
    #endif
    if (!(dict = PyModule_GetDict(module))) goto error;
    if (PyDict_SetItemString(dict, "version_info",
    PyRun_String(QUOTE(version_info), Py_eval_input,
    dict, dict)))
    goto error;
    if (PyDict_SetItemString(dict, "__version__",
    PyUnicode_FromString(QUOTE(__version__))))
    goto error;
    if (PyDict_SetItemString(dict, "connection",
    (PyObject *)&_mysql_ConnectionObject_Type))
    goto error;
    Py_INCREF(&_mysql_ConnectionObject_Type);
    if (PyDict_SetItemString(dict, "result",
    (PyObject *)&_mysql_ResultObject_Type))
    goto error;
    Py_INCREF(&_mysql_ResultObject_Type);
    if (!(emod = PyImport_ImportModule("_mysql_exceptions"))) {
    PyErr_Print();
    goto error;
    }
    if (!(edict = PyModule_GetDict(emod))) goto error;
    if (!(_mysql_MySQLError =
    _mysql_NewException(dict, edict, "MySQLError")))
    goto error;
    if (!(_mysql_Warning =
    _mysql_NewException(dict, edict, "Warning")))
    goto error;
    if (!(_mysql_Error =
    _mysql_NewException(dict, edict, "Error")))
    goto error;
    if (!(_mysql_InterfaceError =
    _mysql_NewException(dict, edict, "InterfaceError")))
    goto error;
    if (!(_mysql_DatabaseError =
    _mysql_NewException(dict, edict, "DatabaseError")))
    goto error;
    if (!(_mysql_DataError =
    _mysql_NewException(dict, edict, "DataError")))
    goto error;
    if (!(_mysql_OperationalError =
    _mysql_NewException(dict, edict, "OperationalError")))
    goto error;
    if (!(_mysql_IntegrityError =
    _mysql_NewException(dict, edict, "IntegrityError")))
    goto error;
    if (!(_mysql_InternalError =
    _mysql_NewException(dict, edict, "InternalError")))
    goto error;
    if (!(_mysql_ProgrammingError =
    _mysql_NewException(dict, edict, "ProgrammingError")))
    goto error;
    if (!(_mysql_NotSupportedError =
    _mysql_NewException(dict, edict, "NotSupportedError")))
    goto error;
    if (!(_mysql_NULL = PyBytes_FromString("NULL")))
    goto error;
    if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
    error:
    if (emod) Py_DECREF(emod);
    if (PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError,
    "_mysql: init failed");
    if (module) Py_DECREF(module);
    module = NULL;
    }
    #ifdef IS_PY3K
    return module;
    #endif
    }
    1. when treating unknown struct MYSQL * from _mysql.c:2987 as non-NULL

    2. when Py_InitModule4TraceRefs_64() succeeds

      new ref from (unknown) Py_InitModule4TraceRefs_64 allocated at: module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,

    3. taking False path

    4. taking False path

    5. when PyRun_StringFlags() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    6. when PyUnicodeUCS4_FromString() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    7. when PyDict_SetItemString() succeeds

      taking False path

    8. when PyDict_SetItemString() succeeds

      taking False path

    9. when PyImport_ImportModule() succeeds

      taking False path

    10. taking False path

    11. when _mysql_NewException() succeeds

    12. taking False path

    13. when _mysql_NewException() succeeds

    14. taking False path

    15. when _mysql_NewException() succeeds

    16. taking False path

    17. when _mysql_NewException() succeeds

    18. taking False path

    19. when _mysql_NewException() succeeds

    20. taking False path

    21. when _mysql_NewException() succeeds

    22. taking False path

    23. when _mysql_NewException() succeeds

    24. taking False path

    25. when _mysql_NewException() succeeds

    26. taking False path

    27. when _mysql_NewException() succeeds

    28. taking False path

    29. when _mysql_NewException() succeeds

    30. taking False path

    31. when _mysql_NewException() succeeds

    32. taking False path

    33. when PyString_FromString() succeeds

      taking False path

    34. when PyDict_SetItemString() succeeds

      taking False path

    35. taking True path

      when taking True path

      taking False path

    36. PyErr_Occurred()

      taking False path

    37. returning

      was expecting final ob_refcnt to be N + 0 (for some unknown N)

      but final ob_refcnt is N + 1

      found 1 similar trace(s) to this

  2. ob_refcnt of '*_mysql_ConnectionObject_Type.355' is 1 too high

    Report

    2
    DL_EXPORT(void)
    init_mysql(void)
    #endif
    {
    PyObject *dict, *module, *emod, *edict;
    utf8conn = mysql_init(NULL);
    utf8conn->charset = &my_charset_utf8mb4_unicode_ci;
    #ifdef IS_PY3K
    module = PyModule_Create(&_mysqlmodule);
    if (!module) return module; /* this really should never happen */
    #else
    module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,
    (PyObject *)NULL, PYTHON_API_VERSION);
    if (!module) return; /* this really should never happen */
    #endif
    #ifdef IS_PY3K
    Py_TYPE(&_mysql_ConnectionObject_Type) = &PyType_Type;
    Py_TYPE(&_mysql_ResultObject_Type) = &PyType_Type;
    #else
    _mysql_ConnectionObject_Type.ob_type = &PyType_Type;
    _mysql_ResultObject_Type.ob_type = &PyType_Type;
    #endif
    #if PY_VERSION_HEX >= 0x02020000
    _mysql_ConnectionObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ResultObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ConnectionObject_Type.tp_new = PyType_GenericNew;
    _mysql_ResultObject_Type.tp_new = PyType_GenericNew;
    #ifndef IS_PY3K
    _mysql_ConnectionObject_Type.tp_free = _PyObject_GC_Del;
    _mysql_ResultObject_Type.tp_free = _PyObject_GC_Del;
    #endif
    #endif
    if (!(dict = PyModule_GetDict(module))) goto error;
    if (PyDict_SetItemString(dict, "version_info",
    PyRun_String(QUOTE(version_info), Py_eval_input,
    dict, dict)))
    goto error;
    if (PyDict_SetItemString(dict, "__version__",
    PyUnicode_FromString(QUOTE(__version__))))
    goto error;
    if (PyDict_SetItemString(dict, "connection",
    (PyObject *)&_mysql_ConnectionObject_Type))
    goto error;
    Py_INCREF(&_mysql_ConnectionObject_Type);
    if (PyDict_SetItemString(dict, "result",
    (PyObject *)&_mysql_ResultObject_Type))
    goto error;
    Py_INCREF(&_mysql_ResultObject_Type);
    if (!(emod = PyImport_ImportModule("_mysql_exceptions"))) {
    PyErr_Print();
    goto error;
    }
    if (!(edict = PyModule_GetDict(emod))) goto error;
    if (!(_mysql_MySQLError =
    _mysql_NewException(dict, edict, "MySQLError")))
    goto error;
    if (!(_mysql_Warning =
    _mysql_NewException(dict, edict, "Warning")))
    goto error;
    if (!(_mysql_Error =
    _mysql_NewException(dict, edict, "Error")))
    goto error;
    if (!(_mysql_InterfaceError =
    _mysql_NewException(dict, edict, "InterfaceError")))
    goto error;
    if (!(_mysql_DatabaseError =
    _mysql_NewException(dict, edict, "DatabaseError")))
    goto error;
    if (!(_mysql_DataError =
    _mysql_NewException(dict, edict, "DataError")))
    goto error;
    if (!(_mysql_OperationalError =
    _mysql_NewException(dict, edict, "OperationalError")))
    goto error;
    if (!(_mysql_IntegrityError =
    _mysql_NewException(dict, edict, "IntegrityError")))
    goto error;
    if (!(_mysql_InternalError =
    _mysql_NewException(dict, edict, "InternalError")))
    goto error;
    if (!(_mysql_ProgrammingError =
    _mysql_NewException(dict, edict, "ProgrammingError")))
    goto error;
    if (!(_mysql_NotSupportedError =
    _mysql_NewException(dict, edict, "NotSupportedError")))
    goto error;
    if (!(_mysql_NULL = PyBytes_FromString("NULL")))
    goto error;
    if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
    error:
    if (emod) Py_DECREF(emod);
    if (PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError,
    "_mysql: init failed");
    if (module) Py_DECREF(module);
    module = NULL;
    }
    #ifdef IS_PY3K
    return module;
    #endif
    }
    1. when treating unknown struct MYSQL * from _mysql.c:2987 as non-NULL

    2. when Py_InitModule4TraceRefs_64() succeeds

    3. taking False path

    4. taking False path

    5. when PyRun_StringFlags() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    6. when PyUnicodeUCS4_FromString() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    7. when PyDict_SetItemString() succeeds

      taking False path

    8. when PyDict_SetItemString() succeeds

      taking False path

    9. when PyImport_ImportModule() succeeds

      taking False path

    10. taking False path

    11. when _mysql_NewException() succeeds

    12. taking False path

    13. when _mysql_NewException() succeeds

    14. taking False path

    15. when _mysql_NewException() succeeds

    16. taking False path

    17. when _mysql_NewException() succeeds

    18. taking False path

    19. when _mysql_NewException() succeeds

    20. taking False path

    21. when _mysql_NewException() succeeds

    22. taking False path

    23. when _mysql_NewException() succeeds

    24. taking False path

    25. when _mysql_NewException() succeeds

    26. taking False path

    27. when _mysql_NewException() succeeds

    28. taking False path

    29. when _mysql_NewException() succeeds

    30. taking False path

    31. when _mysql_NewException() succeeds

    32. taking False path

    33. when PyString_FromString() succeeds

      taking False path

    34. when PyDict_SetItemString() succeeds

      taking False path

    35. taking True path

      when taking True path

      taking False path

    36. PyErr_Occurred()

      taking False path

    37. returning

      was expecting final ob_refcnt to be N + 0 (for some unknown N)

      but final ob_refcnt is N + 1

      found 9 similar trace(s) to this

  3. ob_refcnt of '*_mysql_ResultObject_Type.358' is 1 too high

    Report

    3
    DL_EXPORT(void)
    init_mysql(void)
    #endif
    {
    PyObject *dict, *module, *emod, *edict;
    utf8conn = mysql_init(NULL);
    utf8conn->charset = &my_charset_utf8mb4_unicode_ci;
    #ifdef IS_PY3K
    module = PyModule_Create(&_mysqlmodule);
    if (!module) return module; /* this really should never happen */
    #else
    module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,
    (PyObject *)NULL, PYTHON_API_VERSION);
    if (!module) return; /* this really should never happen */
    #endif
    #ifdef IS_PY3K
    Py_TYPE(&_mysql_ConnectionObject_Type) = &PyType_Type;
    Py_TYPE(&_mysql_ResultObject_Type) = &PyType_Type;
    #else
    _mysql_ConnectionObject_Type.ob_type = &PyType_Type;
    _mysql_ResultObject_Type.ob_type = &PyType_Type;
    #endif
    #if PY_VERSION_HEX >= 0x02020000
    _mysql_ConnectionObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ResultObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ConnectionObject_Type.tp_new = PyType_GenericNew;
    _mysql_ResultObject_Type.tp_new = PyType_GenericNew;
    #ifndef IS_PY3K
    _mysql_ConnectionObject_Type.tp_free = _PyObject_GC_Del;
    _mysql_ResultObject_Type.tp_free = _PyObject_GC_Del;
    #endif
    #endif
    if (!(dict = PyModule_GetDict(module))) goto error;
    if (PyDict_SetItemString(dict, "version_info",
    PyRun_String(QUOTE(version_info), Py_eval_input,
    dict, dict)))
    goto error;
    if (PyDict_SetItemString(dict, "__version__",
    PyUnicode_FromString(QUOTE(__version__))))
    goto error;
    if (PyDict_SetItemString(dict, "connection",
    (PyObject *)&_mysql_ConnectionObject_Type))
    goto error;
    Py_INCREF(&_mysql_ConnectionObject_Type);
    if (PyDict_SetItemString(dict, "result",
    (PyObject *)&_mysql_ResultObject_Type))
    goto error;
    Py_INCREF(&_mysql_ResultObject_Type);
    if (!(emod = PyImport_ImportModule("_mysql_exceptions"))) {
    PyErr_Print();
    goto error;
    }
    if (!(edict = PyModule_GetDict(emod))) goto error;
    if (!(_mysql_MySQLError =
    _mysql_NewException(dict, edict, "MySQLError")))
    goto error;
    if (!(_mysql_Warning =
    _mysql_NewException(dict, edict, "Warning")))
    goto error;
    if (!(_mysql_Error =
    _mysql_NewException(dict, edict, "Error")))
    goto error;
    if (!(_mysql_InterfaceError =
    _mysql_NewException(dict, edict, "InterfaceError")))
    goto error;
    if (!(_mysql_DatabaseError =
    _mysql_NewException(dict, edict, "DatabaseError")))
    goto error;
    if (!(_mysql_DataError =
    _mysql_NewException(dict, edict, "DataError")))
    goto error;
    if (!(_mysql_OperationalError =
    _mysql_NewException(dict, edict, "OperationalError")))
    goto error;
    if (!(_mysql_IntegrityError =
    _mysql_NewException(dict, edict, "IntegrityError")))
    goto error;
    if (!(_mysql_InternalError =
    _mysql_NewException(dict, edict, "InternalError")))
    goto error;
    if (!(_mysql_ProgrammingError =
    _mysql_NewException(dict, edict, "ProgrammingError")))
    goto error;
    if (!(_mysql_NotSupportedError =
    _mysql_NewException(dict, edict, "NotSupportedError")))
    goto error;
    if (!(_mysql_NULL = PyBytes_FromString("NULL")))
    goto error;
    if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
    error:
    if (emod) Py_DECREF(emod);
    if (PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError,
    "_mysql: init failed");
    if (module) Py_DECREF(module);
    module = NULL;
    }
    #ifdef IS_PY3K
    return module;
    #endif
    }
    1. when treating unknown struct MYSQL * from _mysql.c:2987 as non-NULL

    2. when Py_InitModule4TraceRefs_64() succeeds

    3. taking False path

    4. taking False path

    5. when PyRun_StringFlags() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    6. when PyUnicodeUCS4_FromString() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    7. when PyDict_SetItemString() succeeds

      taking False path

    8. when PyDict_SetItemString() succeeds

      taking False path

    9. when PyImport_ImportModule() succeeds

      taking False path

    10. taking False path

    11. when _mysql_NewException() succeeds

    12. taking False path

    13. when _mysql_NewException() succeeds

    14. taking False path

    15. when _mysql_NewException() succeeds

    16. taking False path

    17. when _mysql_NewException() succeeds

    18. taking False path

    19. when _mysql_NewException() succeeds

    20. taking False path

    21. when _mysql_NewException() succeeds

    22. taking False path

    23. when _mysql_NewException() succeeds

    24. taking False path

    25. when _mysql_NewException() succeeds

    26. taking False path

    27. when _mysql_NewException() succeeds

    28. taking False path

    29. when _mysql_NewException() succeeds

    30. taking False path

    31. when _mysql_NewException() succeeds

    32. taking False path

    33. when PyString_FromString() succeeds

      taking False path

    34. when PyDict_SetItemString() succeeds

      taking False path

    35. taking True path

      when taking True path

      taking False path

    36. PyErr_Occurred()

      taking False path

    37. returning

      was expecting final ob_refcnt to be N + 0 (for some unknown N)

      but final ob_refcnt is N + 1

      found 9 similar trace(s) to this

  4. ob_refcnt of new ref from (unknown) PyRun_StringFlags is 1 too high

    Report

    4
    DL_EXPORT(void)
    init_mysql(void)
    #endif
    {
    PyObject *dict, *module, *emod, *edict;
    utf8conn = mysql_init(NULL);
    utf8conn->charset = &my_charset_utf8mb4_unicode_ci;
    #ifdef IS_PY3K
    module = PyModule_Create(&_mysqlmodule);
    if (!module) return module; /* this really should never happen */
    #else
    module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,
    (PyObject *)NULL, PYTHON_API_VERSION);
    if (!module) return; /* this really should never happen */
    #endif
    #ifdef IS_PY3K
    Py_TYPE(&_mysql_ConnectionObject_Type) = &PyType_Type;
    Py_TYPE(&_mysql_ResultObject_Type) = &PyType_Type;
    #else
    _mysql_ConnectionObject_Type.ob_type = &PyType_Type;
    _mysql_ResultObject_Type.ob_type = &PyType_Type;
    #endif
    #if PY_VERSION_HEX >= 0x02020000
    _mysql_ConnectionObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ResultObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ConnectionObject_Type.tp_new = PyType_GenericNew;
    _mysql_ResultObject_Type.tp_new = PyType_GenericNew;
    #ifndef IS_PY3K
    _mysql_ConnectionObject_Type.tp_free = _PyObject_GC_Del;
    _mysql_ResultObject_Type.tp_free = _PyObject_GC_Del;
    #endif
    #endif
    if (!(dict = PyModule_GetDict(module))) goto error;
    if (PyDict_SetItemString(dict, "version_info",
    PyRun_String(QUOTE(version_info), Py_eval_input,
    dict, dict)))
    goto error;
    if (PyDict_SetItemString(dict, "__version__",
    PyUnicode_FromString(QUOTE(__version__))))
    goto error;
    if (PyDict_SetItemString(dict, "connection",
    (PyObject *)&_mysql_ConnectionObject_Type))
    goto error;
    Py_INCREF(&_mysql_ConnectionObject_Type);
    if (PyDict_SetItemString(dict, "result",
    (PyObject *)&_mysql_ResultObject_Type))
    goto error;
    Py_INCREF(&_mysql_ResultObject_Type);
    if (!(emod = PyImport_ImportModule("_mysql_exceptions"))) {
    PyErr_Print();
    goto error;
    }
    if (!(edict = PyModule_GetDict(emod))) goto error;
    if (!(_mysql_MySQLError =
    _mysql_NewException(dict, edict, "MySQLError")))
    goto error;
    if (!(_mysql_Warning =
    _mysql_NewException(dict, edict, "Warning")))
    goto error;
    if (!(_mysql_Error =
    _mysql_NewException(dict, edict, "Error")))
    goto error;
    if (!(_mysql_InterfaceError =
    _mysql_NewException(dict, edict, "InterfaceError")))
    goto error;
    if (!(_mysql_DatabaseError =
    _mysql_NewException(dict, edict, "DatabaseError")))
    goto error;
    if (!(_mysql_DataError =
    _mysql_NewException(dict, edict, "DataError")))
    goto error;
    if (!(_mysql_OperationalError =
    _mysql_NewException(dict, edict, "OperationalError")))
    goto error;
    if (!(_mysql_IntegrityError =
    _mysql_NewException(dict, edict, "IntegrityError")))
    goto error;
    if (!(_mysql_InternalError =
    _mysql_NewException(dict, edict, "InternalError")))
    goto error;
    if (!(_mysql_ProgrammingError =
    _mysql_NewException(dict, edict, "ProgrammingError")))
    goto error;
    if (!(_mysql_NotSupportedError =
    _mysql_NewException(dict, edict, "NotSupportedError")))
    goto error;
    if (!(_mysql_NULL = PyBytes_FromString("NULL")))
    goto error;
    if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
    error:
    if (emod) Py_DECREF(emod);
    if (PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError,
    "_mysql: init failed");
    if (module) Py_DECREF(module);
    module = NULL;
    }
    #ifdef IS_PY3K
    return module;
    #endif
    }
    1. when treating unknown struct MYSQL * from _mysql.c:2987 as non-NULL

    2. when Py_InitModule4TraceRefs_64() succeeds

    3. taking False path

    4. taking False path

    5. when PyRun_StringFlags() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    6. when PyUnicodeUCS4_FromString() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    7. when PyDict_SetItemString() succeeds

      taking False path

    8. when PyDict_SetItemString() succeeds

      taking False path

    9. when PyImport_ImportModule() succeeds

      taking False path

    10. taking False path

    11. when _mysql_NewException() succeeds

    12. taking False path

    13. when _mysql_NewException() succeeds

    14. taking False path

    15. when _mysql_NewException() succeeds

    16. taking False path

    17. when _mysql_NewException() succeeds

    18. taking False path

    19. when _mysql_NewException() succeeds

    20. taking False path

    21. when _mysql_NewException() succeeds

    22. taking False path

    23. when _mysql_NewException() succeeds

    24. taking False path

    25. when _mysql_NewException() succeeds

    26. taking False path

    27. when _mysql_NewException() succeeds

    28. taking False path

    29. when _mysql_NewException() succeeds

    30. taking False path

    31. when _mysql_NewException() succeeds

    32. taking False path

    33. when PyString_FromString() succeeds

      taking False path

    34. when PyDict_SetItemString() succeeds

      taking False path

    35. taking True path

      when taking True path

      taking False path

    36. PyErr_Occurred()

      taking False path

    37. returning

      was expecting final ob_refcnt to be N + 0 (for some unknown N)

      but final ob_refcnt is N + 1

      found 9 similar trace(s) to this

    38. new ref from (unknown) PyRun_StringFlags allocated at: if (PyDict_SetItemString(dict, "version_info",

  5. ob_refcnt of new ref from (unknown) PyUnicodeUCS4_FromString is 1 too high

    Report

    5
    DL_EXPORT(void)
    init_mysql(void)
    #endif
    {
    PyObject *dict, *module, *emod, *edict;
    utf8conn = mysql_init(NULL);
    utf8conn->charset = &my_charset_utf8mb4_unicode_ci;
    #ifdef IS_PY3K
    module = PyModule_Create(&_mysqlmodule);
    if (!module) return module; /* this really should never happen */
    #else
    module = Py_InitModule4("_mysql", _mysql_methods, _mysql___doc__,
    (PyObject *)NULL, PYTHON_API_VERSION);
    if (!module) return; /* this really should never happen */
    #endif
    #ifdef IS_PY3K
    Py_TYPE(&_mysql_ConnectionObject_Type) = &PyType_Type;
    Py_TYPE(&_mysql_ResultObject_Type) = &PyType_Type;
    #else
    _mysql_ConnectionObject_Type.ob_type = &PyType_Type;
    _mysql_ResultObject_Type.ob_type = &PyType_Type;
    #endif
    #if PY_VERSION_HEX >= 0x02020000
    _mysql_ConnectionObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ResultObject_Type.tp_alloc = PyType_GenericAlloc;
    _mysql_ConnectionObject_Type.tp_new = PyType_GenericNew;
    _mysql_ResultObject_Type.tp_new = PyType_GenericNew;
    #ifndef IS_PY3K
    _mysql_ConnectionObject_Type.tp_free = _PyObject_GC_Del;
    _mysql_ResultObject_Type.tp_free = _PyObject_GC_Del;
    #endif
    #endif
    if (!(dict = PyModule_GetDict(module))) goto error;
    if (PyDict_SetItemString(dict, "version_info",
    PyRun_String(QUOTE(version_info), Py_eval_input,
    dict, dict)))
    goto error;
    if (PyDict_SetItemString(dict, "__version__",
    PyUnicode_FromString(QUOTE(__version__))))
    goto error;
    if (PyDict_SetItemString(dict, "connection",
    (PyObject *)&_mysql_ConnectionObject_Type))
    goto error;
    Py_INCREF(&_mysql_ConnectionObject_Type);
    if (PyDict_SetItemString(dict, "result",
    (PyObject *)&_mysql_ResultObject_Type))
    goto error;
    Py_INCREF(&_mysql_ResultObject_Type);
    if (!(emod = PyImport_ImportModule("_mysql_exceptions"))) {
    PyErr_Print();
    goto error;
    }
    if (!(edict = PyModule_GetDict(emod))) goto error;
    if (!(_mysql_MySQLError =
    _mysql_NewException(dict, edict, "MySQLError")))
    goto error;
    if (!(_mysql_Warning =
    _mysql_NewException(dict, edict, "Warning")))
    goto error;
    if (!(_mysql_Error =
    _mysql_NewException(dict, edict, "Error")))
    goto error;
    if (!(_mysql_InterfaceError =
    _mysql_NewException(dict, edict, "InterfaceError")))
    goto error;
    if (!(_mysql_DatabaseError =
    _mysql_NewException(dict, edict, "DatabaseError")))
    goto error;
    if (!(_mysql_DataError =
    _mysql_NewException(dict, edict, "DataError")))
    goto error;
    if (!(_mysql_OperationalError =
    _mysql_NewException(dict, edict, "OperationalError")))
    goto error;
    if (!(_mysql_IntegrityError =
    _mysql_NewException(dict, edict, "IntegrityError")))
    goto error;
    if (!(_mysql_InternalError =
    _mysql_NewException(dict, edict, "InternalError")))
    goto error;
    if (!(_mysql_ProgrammingError =
    _mysql_NewException(dict, edict, "ProgrammingError")))
    goto error;
    if (!(_mysql_NotSupportedError =
    _mysql_NewException(dict, edict, "NotSupportedError")))
    goto error;
    if (!(_mysql_NULL = PyBytes_FromString("NULL")))
    goto error;
    if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
    error:
    if (emod) Py_DECREF(emod);
    if (PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError,
    "_mysql: init failed");
    if (module) Py_DECREF(module);
    module = NULL;
    }
    #ifdef IS_PY3K
    return module;
    #endif
    }
    1. when treating unknown struct MYSQL * from _mysql.c:2987 as non-NULL

    2. when Py_InitModule4TraceRefs_64() succeeds

    3. taking False path

    4. taking False path

    5. when PyRun_StringFlags() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    6. when PyUnicodeUCS4_FromString() succeeds

      when PyDict_SetItemString() succeeds

      taking False path

    7. when PyDict_SetItemString() succeeds

      taking False path

    8. when PyDict_SetItemString() succeeds

      taking False path

    9. when PyImport_ImportModule() succeeds

      taking False path

    10. taking False path

    11. when _mysql_NewException() succeeds

    12. taking False path

    13. when _mysql_NewException() succeeds

    14. taking False path

    15. when _mysql_NewException() succeeds

    16. taking False path

    17. when _mysql_NewException() succeeds

    18. taking False path

    19. when _mysql_NewException() succeeds

    20. taking False path

    21. when _mysql_NewException() succeeds

    22. taking False path

    23. when _mysql_NewException() succeeds

    24. taking False path

    25. when _mysql_NewException() succeeds

    26. taking False path

    27. when _mysql_NewException() succeeds

    28. taking False path

    29. when _mysql_NewException() succeeds

    30. taking False path

    31. when _mysql_NewException() succeeds

    32. taking False path

    33. when PyString_FromString() succeeds

      taking False path

    34. when PyDict_SetItemString() succeeds

      taking False path

    35. taking True path

      when taking True path

      taking False path

    36. PyErr_Occurred()

      taking False path

    37. returning

      was expecting final ob_refcnt to be N + 0 (for some unknown N)

      but final ob_refcnt is N + 1

      found 9 similar trace(s) to this

    38. new ref from (unknown) PyUnicodeUCS4_FromString allocated at: if (PyDict_SetItemString(dict, "__version__",